public void UpdateFacultyDisclosure(Disclosure disclosure) { var db = GetDisclosureById(disclosure.Id); db.IsBackup = true; disclosure.Id = 0; disclosure.EditDate = DateTime.Now; disclosure.SignatureDate = DateTime.Now; _context.Disclosures.Add(disclosure); SaveAll(); }
public bool CreateDisclosure(Disclosure newDisclosure) { try { newDisclosure.CreateDate = DateTime.Now; newDisclosure.EditDate = DateTime.Now; _context.Add(newDisclosure); } catch (Exception ex) { _logger.LogError("Could not add Disclosure", ex); return(false); } return(true); }