AppBoxr.Controllers.AppBoxrController.Delete C# (CSharp) Method

Delete() private method

private Delete ( string collection, string ids, string hub = "appboxr" ) : HttpResponseMessage
collection string
ids string
hub string
return System.Net.Http.HttpResponseMessage
        public HttpResponseMessage Delete(string collection, string ids, string hub = "appboxr")
        {
            var _repo = GlobalHost.DependencyResolver.Resolve<IDataLayer>();
            var _ids = ids.Split(',');
            List<string> wrapped = new List<string>();
            foreach (var id in _ids)
                wrapped.Add("{ \"$oid\": \"" + id.Replace("\"", "") + "\"}");

            var _res = _repo.Delete(new { collection = collection, ids = String.Concat("[", String.Join(",", wrapped), "]") });

            //notify user UIs of the delete
            var c = GlobalHost.ConnectionManager.GetHubContext(hub);
            c.Clients.All.process(new { appBoxr = new { process = new { top = "DELETE" } } });

            return this.Request.CreateResponse(
               HttpStatusCode.OK
               , _res
            );
        }
AppBoxrController