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); }
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); }