public UsersController( CarManagerDbContext dbContext, IMapper mapper, UserManager <User> userManager) { this.dbContext = dbContext; this.mapper = mapper; this.userManager = userManager; }
protected override void Seed(CarManagerDbContext context) { var states = new List <State>(); states.Add(new State { Name = "VePo" }); states.Add(new State { Name = "Regio" }); context.States.AddRange(states); context.SaveChanges(); }
public void Index_View() { //Arrange var options = new DbContextOptionsBuilder <CarManagerDbContext>() .UseInMemoryDatabase(Guid.NewGuid().ToString()) .Options; var dbContext = new CarManagerDbContext(options); AutoMapper.Mapper.Initialize(config => config.AddProfile <AutoMapperProfile>()); var controller = new HomeController(dbContext, AutoMapper.Mapper.Instance); //Act var result = controller.Index(); //Assert Assert.IsInstanceOfType(result, typeof(ViewResult)); }
public StateRepository(CarManagerDbContext databaseContext) : base(databaseContext) { }
public CarController(CarManagerDbContext dbContext, UserManager <AppUser> userManager) { this._dbContext = dbContext; this._userManager = userManager; }
public CarApiController(CarManagerDbContext dbContext) { this._dbContext = dbContext; }
public DeleteModel(CarManagerDbContext context, IMapper mapper) { this.context = context; this.mapper = mapper; }
public AddTaxModel(CarManagerDbContext context) { this.context = context; }
public LoggedUserVehiclesService(CarManagerDbContext dbContext, IMapper mapper) : base(dbContext, mapper) { }
public PlanningRepository(CarManagerDbContext databaseContext) : base(databaseContext) { }
// Constructor public GenericRepository(CarManagerDbContext context) { this.context = context; this.dbSet = context.Set <TEntity>(); }
public AddRefuelingModel(CarManagerDbContext context, IMapper mapper) { this.context = context; this.mapper = mapper; }
public HomeController(CarManagerDbContext context, IMapper mapper) { this.context = context; this.mapper = mapper; }
public BaseEFService(CarManagerDbContext dbContext, IMapper mapper) { this.DbContext = dbContext; this.Mapper = mapper; }
public AddServiceInfoModel(CarManagerDbContext context, IMapper mapper) { this.context = context; this.mapper = mapper; }