Esempio n. 1
0
        public bool DeleteOptType(console.Models.tbl_OptInType entity)
        {
            bool result = false;

            using (var context = new console.Models.dream_techContext())
            {
                context.tbl_OptInType.Remove(entity);
                result = context.SaveChanges() > 1;
            }
            return(result);
        }
Esempio n. 2
0
        public bool UpdateOptType(console.Models.tbl_OptInType entity)
        {
            bool result = false;

            using (var context = new console.Models.dream_techContext())
            {
                tbl_OptInType type = (from o in context.tbl_OptInType where o.opt_type_id == entity.opt_type_id select o).First();

                type.optin_category = entity.optin_category;

                result = context.SaveChanges() > 1;
            }
            return(result);
        }