public static ClassSystemMessege GetDtoSMessege(Dal.SystemMessege m) { ClassSystemMessege me = new ClassSystemMessege() { Messege_id = m.Messege_id, Messege_Content = m.Messege_Content, Creation_date = m.Creation_date, Deletion_date = m.deletion_date, }; return(me); }
public static Dal.SystemMessege PostSMessege(ClassSystemMessege m) { Dal.SystemMessege me = new Dal.SystemMessege() { Messege_id = m.Messege_id, Messege_Content = m.Messege_Content, Creation_date = m.Creation_date, deletion_date = m.Deletion_date, }; return(me); }
public static void PostSMessege(SystemMessege sm) { try { using (GymDBEntities g = new GymDBEntities()) { g.SystemMessege.Add(sm); g.SaveChanges(); } } catch (Exception e) { Console.WriteLine(e); } }