Exemplo n.º 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;

            });
        }
Exemplo n.º 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;

            });
        }
Exemplo n.º 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);
Exemplo n.º 7
0
 public void CultureUpdate(Culture culture)
 {
     adventureWorks_BC.CultureUpdate(culture);
 }
Exemplo n.º 8
0
 public void CultureDelete(Culture culture)
 {
     adventureWorks_BC.CultureDelete(culture);
 }
Exemplo n.º 9
0
 public void CultureAdd(Culture culture)
 {
     adventureWorks_BC.CultureAdd(culture);
 }