Beispiel #1
0
        public async Task <IHttpActionResult> GetVendor(string id)
        {
            var vendor = await vendorRepository.GetVendorById(id);

            if (vendor == null)
            {
                return(Content(HttpStatusCode.NotFound, new { message = $"Vendor {id} is not found" }));
            }
            return(Json(vendor));
        }