Beispiel #1
0
        //private readonly ILogRepository _logRepository = new LogRepository();

        #endregion

        #region Methods

        public void AddProfileForMenu(ProfileForMenu entity, long userId)
        {
            _context.ProfileForMenu.Add(entity);
            _context.SaveChanges();

            //_logRepository.Add(new Log().GeneratedForEntity(userId, entity, LogTypeResource.Insert));
        }
Beispiel #2
0
        public void EnableOrDisabled(int profileId, int menuId, long permissionId, long userId)
        {
            if (permissionId != 0)
            {
                _menuRepository.RemoveProfileForMenu(permissionId, userId);
            }
            else
            {
                var pm = new ProfileForMenu
                {
                    ProfileId = profileId,
                    MenuId    = menuId,
                };

                _menuRepository.AddProfileForMenu(pm, userId);
            }
        }