public List <PassingGoodsDetailModel> GetDetailForSecurity(bool isImport, DateTime?fromDate, DateTime?toDate, string userId) { try { var list = (from l in _db.SP_PASSINGGOODS_DETAIL_GET_FOR_SECURITY(isImport, fromDate, toDate, userId) select new PassingGoodsDetailModel() { Id = l.Id, MasterId = l.MasterId, Code = l.Code, Applicant = l.Applicant, ApplicantName = l.ApplicantName, OrgName = l.OrgName, PlantName = l.PlantName, DeptName = l.DeptName, SectionName = l.SectName, ApplicationDate = l.ApplicationDate, ExportDate = l.ExportDate, ItemName = l.ItemName, ItemLocation = l.ItemLocation, Serial = l.Serial, Description = l.Description, Quantity = l.Quantity, ReImport = l.ReImport ?? false, ReImportDate = l.ReImportDate, IsAttachment = l.IsAttachment, Remark = l.Remark, ImportDate = l.ImportDate, ImportGate = l.ImportGate, ImportName = l.ImportName, ImportUid = l.ImportUid, IsView = l.ISVIEW == 1 ? true : false }).ToList(); return(list); } catch (Exception ex) { LogHelper.Error("PassingGoodsRepository GetDetailForSecurity: " + ex.Message + " Inner Exception: " + ex.InnerException.Message); return(null); } }