public async Task <IHttpActionResult> GetForNvByCode(string code) { MdMerchandiseVm.Dto result = null; var unitCode = _service.GetCurrentUnitCode(); //var instance = _service.Repository.DbSet.FirstOrDefault(x => x.MaVatTu.ToUpper() == code.ToUpper());//&& x.UnitCode == unitCode); var service = new ProcedureService <MdNhomVatTuVm.Dto>(); var data = ProcedureCollection.GetNhomVatTu(new BTS.API.ENTITY.ERPContext(), code, unitCode); if (data != null && data.Count() >= 1) { var items = data.ToList(); return(Ok(items[0])); } else { return(NotFound()); } }