public async Task <User> AddAsync(User user) { user.Id = user.Id == Guid.Empty ? Guid.NewGuid() : user.Id; dbContext.Add(user); await dbContext.SaveChangesAsync(); return(user); }
public async Task <Event> AddAsync(Event evnt) { evnt.Id = evnt.Id == Guid.Empty ? Guid.NewGuid() : evnt.Id; _eventContext.Add(evnt); await _eventContext.SaveChangesAsync(); return(evnt); }