public UserController(IEntityMaint <User> entityMaint, IJwtTokenManager jwtTokenManager) : base(entityMaint) { this.jwtTokenManager = jwtTokenManager; if (this.entityMaint.GetAll().Any()) { return; } this.entityMaint.Add(new User() { Id = 1, UserName = "******", Password = "******" }); this.entityMaint.Add(new User() { Id = 2, UserName = "******", Password = "******" }); this.entityMaint.Add(new User() { Id = 3, UserName = "******", Password = "******" }); }
public ProductController(IEntityMaint <Product> entityMaint) : base(entityMaint) { if (this.entityMaint.GetAll().Any()) { return; } this.entityMaint.Add(new Product() { Id = 1, Code = "iphone1", Description = "iPhone 1" }); this.entityMaint.Add(new Product() { Id = 2, Code = "iphone2", Description = "iPhone 2" }); this.entityMaint.Add(new Product() { Id = 3, Code = "iphone3", Description = "iPhone 3" }); this.entityMaint.Add(new Product() { Id = 4, Code = "iphone4", Description = "iPhone 4" }); }
public BaseController(IEntityMaint <T> entityMaint) { this.entityMaint = entityMaint; }