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

Save() private method

private Save ( string collection, dynamic obj, string hub = "appboxr" ) : HttpResponseMessage
collection string
obj dynamic
hub string
return System.Net.Http.HttpResponseMessage
        public HttpResponseMessage Save(string collection, dynamic obj, string hub = "appboxr")
        {
            var _repo = GlobalHost.DependencyResolver.Resolve<IDataLayer>();
            var _pst = new List<dynamic>() { new { collection = collection, model = obj } };
            var _ids = _repo.Save(JsonConvert.SerializeObject(_pst));

            //notify user UIs of the save
            var c = GlobalHost.ConnectionManager.GetHubContext(hub);
            c.Clients.All.process(new { appBoxr = new { models = _pst, process = new { top = "SAVE", opts = new { rebindTemplates = true, resetUI = false } } } });

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