public async Task <JsonResult> Get(int id) { using (CustomerProvider customerProvider = new CustomerProvider()) { return(Json(await customerProvider.GetByIDAsync(id), JsonRequestBehavior.AllowGet)); } }