Пример #1
0
        //Post-Add new

        public static bool AddServiceAreas(ServiceAreas s)
        {
            try
            {
                using (Natural_wayEntities db = new Natural_wayEntities())
                {
                    db.ServiceAreas.Add(s);
                    db.SaveChanges();
                    return(true);
                }
            }
            catch (Exception e)
            {
                return(false);
            }
        }
Пример #2
0
 //gets dal and convert it to dto (by the ctor)
 public ServiceAreas1(Dal.ServiceAreas s)
 {
     SAId   = s.SAId;
     SAName = s.SAName;
 }