public Account Delete(int id) { var account = context.Accounts.FirstOrDefault(x => x.Id == id); if (account == null) { return(null); } context.Remove(account); context.SaveChanges(); return(account); }
public Trade Delete(int id) { var trade = context.Trades.FirstOrDefault(x => x.Id == id); if (trade == null) { return(null); } context.Remove(trade); context.SaveChanges(); return(trade); }