//public void AddPermission(long? parentObjectId, Business entity, Brand child) //{ // AddPermission(parentObjectId,entity.BusinessId, child.BrandId, PermissionTypeEnum.Brand); //} #endregion #region Product families public ProductFamily ProductFamilyCreate(string description) { var entity = new ProductFamily(); entity.ProductFamilyId = this.Context.GenerateNextIntId(); entity.Description = description; this.Context.ProductFamilies.Add(entity); return(entity); }
//public void AddPermission(long? parentObjectId, User entity, ProductFamily child) //{ // AddPermission(parentObjectId, entity.UserId, child.ProductFamilyId, PermissionTypeEnum.ProductFamily); //} //public void AddPermission(Group entity, ProductFamily child) //{ // AddPermission(entity.GroupId, child.ProductFamilyId, PermissionTypeEnum.ProductFamily); //} public void AddPermission(BusinessType entity, ProductFamily child) { AddPermission(null, EntityEnum.BusinessType, (long)entity.BusinessTypeId, EntityEnum.ProductFamily, child.ProductFamilyId, PermissionTypeEnum.ProductFamily); }