Exemplo n.º 1
0
        public async Task <IEnumerable <DemoModel> > GetAllDemoModelsAsync()
        {
            var dbModels = await _demoDbModelRepository.GetAllAsync();

            var demoModels = dbModels.Select(dbM => new DemoModel
            {
                Id         = dbM.Id,
                Name       = dbM.Name,
                Created    = dbM.Created,
                Modified   = dbM.Modified,
                CommonInfo = dbM.DemoCommonInfoModel.CommonInfo
            });

            return(demoModels);
        }
Exemplo n.º 2
0
 public async Task <IEnumerable <DemoModel> > GetAllDemoModelsAsync()
 {
     return((await _demoDbModelRepository.GetAllAsync()).Select(Mapper.Map <DemoDbModel, DemoModel>));
 }