public async Task <Question> CreateQuestion(Question question) { _context.Questions.Add(question); await _context.SaveChangesAsync(); return(question); }
public async Task <User> CreateUser(User user) { _context.Users.Add(user); await _context.SaveChangesAsync(); return(user); }
public async Task <T> CreateAsync(T entity) { await context.AddAsync <T>(entity); await context.SaveChangesAsync(); return(entity); }