Esempio n. 1
0
        public ExceptionLog GetExceptionLog(int logId)
        {
            var coreDbContext = (DbContextBase)_dc;
            var log           = _dc.Set <Log>().Include("ExceptionLog").FirstOrDefault(l => l.Id == logId);

            if (log != null)
            {
                return(log.ExceptionLog);
            }

            return(null);
        }
Esempio n. 2
0
        public void DeleteWithRoles(User user)
        {
            var findedUser = _dbContext.Set <User>().AsNoTracking().Include("UserProfile").FirstOrDefault(a => a.Id == user.Id);

            if (findedUser != null)
            {
                LogicalDelete(findedUser, true);
            }

            //var userRoles = findedUser.UserRoles;


            //Update(findedUser);
        }
Esempio n. 3
0
    //...

    public BaseRepository(IDbContextBase context)
    {
        Context = context;
        Set     = Context.Set <TEntity>();
    }
Esempio n. 4
0
 public List <int> GetViewElementsIdByRoleId(int?roleId)
 {
     return(_dbContext.Set <ViewElementRole>().Where(a => a.RoleId == roleId).Select(viewElementRole => viewElementRole.ViewElementId).ToList());
 }