// GET api/values public HttpResponseMessage Get(HttpRequestMessage request) { KUserView kv = new KUserView(); var kusers = _session.QueryOver<KUser>().List().Distinct().ToList(); List<KUserView> kvs = kusers.Select(GetBalance).ToList(); var responsec = request.CreateResponse(HttpStatusCode.OK, kvs);//, new XmlMediaTypeFormatter()); //response.Headers.Add("Location", '/api/users'); return responsec; //return new string[] { "value1", "value2" }; }
public ActionResult Startcampaign() { var kv = new KUserView(); var id = "+19083037723"; var kusers = _session.QueryOver<KUser>().Where(x => x.Mobile == id).List().Distinct().ToList(); List<KUserView> kvs = kusers.Select(GetBalance).ToList(); //var responsec = request.CreateResponse(HttpStatusCode.OK, kvs);//, new XmlMediaTypeFormatter()); //response.Headers.Add("Location", '/api/users'); //return responsec; //return new string[] { "value1", "value2" }; return View("Campaign", kvs); }