예제 #1
0
        public async Task <MakeConciseViewModel> GetMakeByNameAsync(string name)
        {
            Make make = await this.dbContext.Makes.FirstOrDefaultAsync(x => x.Name == name);

            MakeConciseViewModel model = this.mapper.Map <MakeConciseViewModel>(make);

            return(model);
        }
예제 #2
0
        public async Task <MakeConciseViewModel> GetMakeByIdAsync(int id)
        {
            Make make = await this.dbContext.Makes.FirstOrDefaultAsync(x => x.Id == id);

            MakeConciseViewModel model = this.mapper.Map <MakeConciseViewModel>(make);

            return(model);
        }