public Tavern Delete(string userId) { Tavern tavern = _context.Tavern.FirstOrDefault(x => x.UserId == userId); if (tavern != null) { _context.Tavern.Remove(tavern); _context.SaveChanges(); } return(tavern); }
public Tavern Add(Tavern tavern) { _context.Tavern.Add(tavern); _context.SaveChanges(); return(tavern); }