public void Update(T obj) { table.Attach(obj); _context.Entry(obj).State = EntityState.Modified; _context.SaveChanges(); }
public Friend AddFriend(Friend friend) { _dbContext.Add(friend); _dbContext.SaveChanges(); return(friend); }