public bool UpdateServiceOrder(ServiceOrder serviceOrder) { try { context.OrdensServico.Update(serviceOrder); context.SaveChanges(); return(true); } catch (Exception) { return(false); throw; } }
public bool DeleteServiceOrder(int serviceOrderId) { ServiceOrder so = context.OrdensServico.Find(serviceOrderId); try { context.OrdensServico.Remove(so); context.SaveChanges(); return(true); } catch (Exception) { return(false); throw; } }