public List <ImportDetailDTO> GetListDetailDTOs(int id) { using (ImportDAO db = new ImportDAO(_context)) { var re = db.Get(id); return(LsObjectMapperTo <ImportDetail, ImportDetailDTO>(re.ImportDetails)); } }
public JsonResult Get(long id) { try { Import data = dao.Get(id); return(Json(new { data = data }, JsonRequestBehavior.AllowGet)); } catch (Exception) { return(Json(new { data = DBNull.Value.ToString() }, JsonRequestBehavior.AllowGet)); } }