public async Task Seed() { if (!_ctx.Events.Any()) { _ctx.AddRange(_sampleEvents); _ctx.AddRange(_sampleUsers); _ctx.AddRange(_sampleInvitations); await _ctx.SaveChangesAsync(); } }
public async Task <bool> SaveAllAsync() { return((await _context.SaveChangesAsync()) > 0); }