public async Task <int?> AddAsync(Review entity) { try { _context.Reviews.Add(entity); await _context.SaveChangesAsync(); var id = entity.Id; return(id); } catch { return(null); } }
public async Task <int?> AddAsync(Bench entity) { try { _context.Benches.Add(entity); await _context.SaveChangesAsync(); var result = entity.Id; return(result); } catch { return(null); } }