//gets dal and convert it to dto (by the ctor) public Archives1(Dal.Archives a) { ArchivesId = a.ArchivesId; PatientId = a.PatientId; TherapistId = a.TherapistId; MeetDate = a.MeetDate; CategoryId = a.CategoryId; IsDone = a.IsDone; }
//Post-Add public static bool AddArchives(Archives a) { try { using (Natural_wayEntities db = new Natural_wayEntities()) { db.Archives.Add(a); db.SaveChanges(); return(true); } } catch (Exception e) { return(false); } }