Example #1
0
        public List <SpecimenMappingListsDTO> GetSpecimenMappingListWithModel(SpecimenMappingSearch searchModel)
        {
            log.MethodStart();
            List <SpecimenMappingListsDTO> objList = new List <SpecimenMappingListsDTO>();

            using (var trans = _db.Database.BeginTransaction())
            {
                try
                {
                    objList = _db.SpecimenMappingListsDTOs.FromSqlRaw <SpecimenMappingListsDTO>("sp_GET_TRSpecimenMappingList {0}, {1}", searchModel.spm_mappingid, searchModel.spm_mst_code).ToList();

                    trans.Commit();
                }
                catch (Exception ex)
                {
                    // TODO: Handle failure
                    trans.Rollback();
                }
                finally
                {
                    trans.Dispose();
                }
            }

            log.MethodFinish();
            return(objList);
        }
        public IEnumerable <SpecimenMappingListsDTO> Get_SpecimenHONetMappingListByModel([FromBody] SpecimenMappingSearch searchModel)
        {
            var objReturn = _service.GetSpecimenMappingListWithModel(searchModel);

            return(objReturn);
        }
Example #3
0
        public async Task <List <SpecimenMappingListsDTO> > GetSpecimenMappingListByModelAsync(SpecimenMappingSearch searchData)
        {
            List <SpecimenMappingListsDTO> objList = new List <SpecimenMappingListsDTO>();

            objList = await _apiHelper.GetDataListByModelAsync <SpecimenMappingListsDTO, SpecimenMappingSearch>("mapping_api/Get_SpecimenMappingListByModel", searchData);

            return(objList);
        }