public IEnumerable <ApplicationConfigModel> GetAll(string name, int deptId, string kind, DateTime?dateFrom, DateTime?dateTo) { try { var list = (from l in _db.SP_APPLICATION_CONFIG_GETALL(name, deptId, kind, dateFrom, dateTo) select new ApplicationConfigModel() { Id = l.Id, Name = l.Name, Code = l.Code, DeptId = l.DeptId, DeptName = l.DeptName, Description = l.Description, ApprovalLineName = l.ApprovalLineName, ApprovalLineDefault = l.ApprovalLineDefault, ApprovalLineJson = l.ApprovalLineJson, ApprovalKind = l.ApprovalKind, KindName = l.KindName, Active = l.Active, CreateDate = l.CreateDate, CreateUid = l.CreateUid, CreateName = l.CreateName }).ToList(); return(list); } catch (Exception ex) { LogHelper.Error("ApplicationConfigRepository Application Config get all: " + ex.Message + " Inner Exception: " + ex.InnerException.Message); return(null); } }