//gets dal and convert it to dto (by the ctor) public WorkHours1(Dal.WorkHours w) { WorkHoursId = w.WorkHoursId; TherapistId = w.TherapistId; Day = w.Day; Hour = w.Hour; }
//Post-Add new public static bool AddWorkHours(WorkHours w) { try { using (Natural_wayEntities db = new Natural_wayEntities()) { db.WorkHours.Add(w); db.SaveChanges(); return(true); } } catch (Exception e) { return(false); } }