public ResponseObjectPackage<DictionaryModel> GetDictionaryByID(int dictionaryID)
 {
     RequestObjectPackage<DictionarySearchTemplate> request = new RequestObjectPackage<DictionarySearchTemplate>()
     {
         requestData = new DictionarySearchTemplate()
         {
             ID = dictionaryID
         }
     };
     ResponseObjectPackage<List<DictionaryModel>> response = new DBUtils().RunSqlAction(DictionariesRepository.GetBySearchTemplate, request);
     DictionaryModel dictionary = response.GetDataOrExceptionIfError().First();
     return new ResponseObjectPackage<DictionaryModel>() { resultData = dictionary };
 }
Esempio n. 2
0
 public ResponseObjectPackage<QueryTypeModel> GetQueryTypeByID(int queryTypeID)
 {
     RequestObjectPackage<QueryTypeSearchTemplate> request = new RequestObjectPackage<QueryTypeSearchTemplate>()
     {
         requestData = new QueryTypeSearchTemplate()
         {
             ID = queryTypeID
         }
     };
     ResponseObjectPackage<List<QueryTypeModel>> response = new DBUtils().RunSqlAction(QueryTypesRepository.GetBySearchTemplate, request);
     QueryTypeModel model = response.GetDataOrExceptionIfError().First();
     return new ResponseObjectPackage<QueryTypeModel>() { resultData = model };
 }