public UserController(SmallPostersContext smallPostersContext) { this._smallPostersContext = smallPostersContext; if (!_smallPostersContext.Accounts.Any(a => a.Username == DefaultAdminUsername)) { _smallPostersContext.Accounts.Add(new Account(DefaultAdminUsername, DefaultAdminPassword, true)); _smallPostersContext.SaveChanges(); } }
public AdService(SmallPostersContext smallPostersContext) { this._smallPostersContext = smallPostersContext; }
public AdController(SmallPostersContext smallPostersContext, IAdService adService) { this._smallPostersContext = smallPostersContext; this._adService = adService; }