Ejemplo n.º 1
0
        public int ControllerGroup(RolePrivilageModel modelTosave)
        {
            ControllerGroups datamodel = new ControllerGroups
            {
                ControllerGroupName = modelTosave.GroupId.ToString(),
                SeqNumber           = modelTosave.SeqNumber,
                ProductId           = modelTosave.ProductId
            };

            ent.AddToControllerGroups(datamodel);
            ent.SaveChanges();
            return(datamodel.ControllerGroupId);
        }
Ejemplo n.º 2
0
        // for checking duplicate insertion of GroupName
        public bool CheckDuplicateGroupName(string GroupName)
        {
            ControllerGroups result = ent.ControllerGroups.Where(x => x.ControllerGroupName == GroupName).FirstOrDefault();

            if (result != null)
            {
                return(false);
            }
            else
            {
                return(true);
            }
        }