public async Task <IActionResult> Get(string brand, string model) { var paraglider = await productsService.FindOneAsync(x => x.Brand.ToLower() == brand.ToLower() && x.Model.ToLower() == model.ToLower()); if (paraglider == null) { return(Json(new { })); } await productsService.AddViewAsync(paraglider); return(this.Json(paraglider)); }
public async Task <IActionResult> Get(string brand, string model) { var harness = await productService.FindOneAsync(x => x.Brand.ToLower() == brand.ToLower() && x.Model.ToLower() == model.ToLower()); if (harness != null) { await productService.AddViewAsync(harness); return(this.Json(harness)); } return(Json(new { })); }