public bool AddVacationSupplier(VacationSuppliers T) { try { dc.VacationSuppliers.Add(T); dc.SaveChanges(); return(true); } catch { return(false); } }
public bool EditVacationSupplier(VacationSuppliers T) { try { var data = dc.VacationSuppliers.Where(o => o.Id == T.Id).FirstOrDefault(); data.SupplierId = T.SupplierId; data.VacationId = T.VacationId; dc.SaveChanges(); return(true); } catch { return(false); } }
public IActionResult editVacationSuppliers([FromBody] VacationSuppliers T) { return(Ok(vacationSupplierRepository.EditVacationSupplier(T))); }