private async Task Add100AnsweredContacts(ZooPlanetDbContext db) { for (var i = 0; i < 100; i++) { await db.AddAsync(new Contact { Title = $"Random title {i}", AddedOn = DateTime.UtcNow, Message = $"Some Random Message {i}", IsAnswered = true, ContactType = (ContactType)this.randomGenerator.Next(1, 4) }); } await db.SaveChangesAsync(); }
public UserAdminService(ZooPlanetDbContext db) { this.db = db; }
public ContactService(ZooPlanetDbContext db) { this.db = db; }
public AnimalService(ZooPlanetDbContext db) { this.db = db; }