Пример #1
0
        public bool CultureDelete(Culture culture)
        {
            return Execute<bool>(dal =>
            {
                Culture cultureDelete = dal.Culture.Where(x => x.CultureID == culture.CultureID).FirstOrDefault();
                if (cultureDelete != null)
                {
                    dal.Culture.DeleteOnSubmit(cultureDelete);
                    dal.SubmitChanges();
                    return true;
                }
                return false;

            });
        }
Пример #2
0
        public bool CultureAdd(Culture culture)
        {
            return Execute<bool>(dal =>
            {
                Culture cultureAdd = dal.Culture.Where(x => x.CultureID == culture.CultureID).FirstOrDefault();
                if (cultureAdd != null)
                {
                    dal.Culture.InsertOnSubmit(cultureAdd);
                    dal.SubmitChanges();
                    return true;
                }
                return false;

            });
        }
Пример #3
0
        public bool CultureUpdate(Culture culture)
        {
            return Execute<bool>(dal =>
               {
               Culture cultureUpdate = dal.Culture.Where(x => x.CultureID == culture.CultureID).FirstOrDefault();
               if (cultureUpdate != null)
               {
                   cultureUpdate.CultureID = culture.CultureID;
                   cultureUpdate.Name = culture.Name;
                   cultureUpdate.ModifiedDate = culture.ModifiedDate;

                   dal.SubmitChanges();
                   return true;
               }
               return false;

               });
        }
 partial void DeleteCulture(Culture instance);
 partial void UpdateCulture(Culture instance);
 partial void InsertCulture(Culture instance);
Пример #7
0
 public void CultureUpdate(Culture culture)
 {
     adventureWorks_BC.CultureUpdate(culture);
 }
Пример #8
0
 public void CultureDelete(Culture culture)
 {
     adventureWorks_BC.CultureDelete(culture);
 }
Пример #9
0
 public void CultureAdd(Culture culture)
 {
     adventureWorks_BC.CultureAdd(culture);
 }