public List <PassingGoodsDetailModel> GetViaMaster(int?id, int?masterId) { try { var list = (from l in _db.SP_PASSINGGOODS_DETAIL_GET(id, masterId, null) select new PassingGoodsDetailModel() { Id = l.Id, MasterId = l.MasterId, ItemName = l.ItemName, ItemLocation = l.ItemLocation, Serial = l.Serial, Description = l.Description, Quantity = l.Quantity, ReImport = l.ReImport ?? false, ReImportName = l.ReImportName, ReImportDate = l.ReImportDate, IsAttachment = l.IsAttachment, Remark = l.Remark, ImportDate = l.ImportDate, ImportGate = l.ImportGate, ImportName = l.ImportName, ImportUid = l.ImportUid }).ToList(); return(list); } catch (Exception ex) { LogHelper.Error("PassingGoodsRepository GetAll: " + ex.Message + " Inner Exception: " + ex.InnerException.Message); return(null); } }