// GET api/sales public List<CountryMarketShare_Result> GetMarketShare(string Country, DateTime FromDate, DateTime ToDate) { var northwind = new NorthwindEntities(); var result = northwind.CountryMarketShare(Country, FromDate.ToString("yyyyMMdd"), ToDate.ToString("yyyyMMdd")); return result.ToList(); }
public ActionResult MarketShareByCountry(string Country, DateTime FromDate, DateTime ToDate) { var northwind = new NorthwindEntities(); var result = northwind.CountryMarketShare(Country, FromDate.ToString("yyyyMMdd"), ToDate.ToString("yyyyMMdd")); return Json(result, JsonRequestBehavior.AllowGet); }