Showing 7 of 7 total issues
Method OnModelCreating
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
protected override void OnModelCreating(ModelBuilder modelBuilder) { base.OnModelCreating(modelBuilder); modelBuilder.Entity<Permission>(entity =>
Method ApplyEasyPermission
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
public static void ApplyEasyPermission(this IApplicationBuilder app) { var type = typeof(PermissionProvider); var service = AppDomain.CurrentDomain.GetAssemblies().SelectMany(s => s.GetTypes()) .Where(p => type.IsAssignableFrom(p) && !p.IsInterface)
Method ConfigureServices
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
public void ConfigureServices(IServiceCollection services) { services.AddControllers(); services.AddEasyPermission();
Similar blocks of code found in 2 locations. Consider refactoring. Open
public virtual async Task<T> InsertAsync<T>(T entity) where T : class { var entry = Entry(entity); entry.State = EntityState.Added; await SaveChangesAsync();
- Read upRead up
Similar blocks of code found in 2 locations. Consider refactoring. Open
public virtual async Task<T> UpdateAsync<T>(T entity) where T : class { var entry = Entry(entity); entry.State = EntityState.Modified; await SaveChangesAsync();
- Read upRead up
Similar blocks of code found in 2 locations. Consider refactoring. Open
var service = AppDomain.CurrentDomain.GetAssemblies().SelectMany(s => s.GetTypes()) .Where(p => type.IsAssignableFrom(p) && !p.IsInterface) .Where(c => c.GetCustomAttribute<RegisterIdentifierAttribute>().Provider == provider)
- Read upRead up
Similar blocks of code found in 2 locations. Consider refactoring. Open
var service = AppDomain.CurrentDomain.GetAssemblies().SelectMany(s => s.GetTypes()) .Where(p => type.IsAssignableFrom(p) && !p.IsInterface) .FirstOrDefault();
- Read upRead up