Exemplo n.º 1
0
 public static List <TestModelDto> GetList()
 {
     using (var provider = ProvidersHelper.Resolve <ITestProvider>())
     {
         var rsDao = provider.GetList(1, 10);
         var rsDto = MapperHelper.AutoMapTo <List <TestModelDto> >(rsDao);
         return(rsDto);
     }
 }
Exemplo n.º 2
0
 public static List <TestModelDto> GetListByPage(int pageIndex, int pageSize)
 {
     using (var provider = ProvidersHelper.Resolve <ITestProvider>())
     {
         var rsDao = provider.GetList(pageIndex, pageSize);
         var rsDto = MapperHelper.AutoMapTo <List <TestModelDto> >(rsDao);
         return(rsDto);
     }
 }
Exemplo n.º 3
0
 public static TestModelDto GetData()
 {
     using (var provider = ProvidersHelper.Resolve <ITestProvider>())
     {
         var rsDao = provider.GetData(1);
         var rsDto = MapperHelper.AutoMapTo <TestModelDto>(rsDao);
         return(rsDto);
     }
 }
Exemplo n.º 4
0
 public static TestModelDto AddDataByModel(TestModelDto model)
 {
     using (var provider = ProvidersHelper.Resolve <ITestProvider>())
     {
         var daoModel = MapperHelper.AutoMapTo <DaoTestModel>(model);
         var rsDao    = provider.AddData(daoModel);
         var rsDto    = MapperHelper.AutoMapTo <TestModelDto>(rsDao);
         return(rsDto);
     }
 }
Exemplo n.º 5
0
 public static TestModelDto AddData()
 {
     using (var provider = ProvidersHelper.Resolve <ITestProvider>())
     {
         var rsDao = provider.AddData(new DaoTestModel()
         {
             Name = "AccountName", Psw = "888888"
         });
         var rsDto = MapperHelper.AutoMapTo <TestModelDto>(rsDao);
         return(rsDto);
     }
 }