public Bundle CreateBundle([RestMessage(RestMessageFormat.SimpleJson)] Bundle bundleToInsert) { IBatchRepositoryService bundleService = ApplicationContext.Current.GetService <IBatchRepositoryService>(); return(bundleService.Insert(bundleToInsert)); }
/// <summary> /// Initializes a new instance of the <see cref="BundleResourceHandler"/> class. /// </summary> public BundleResourceHandler() { ApplicationContext.Current.Started += (o, e) => this.repositoryService = ApplicationContext.Current.GetService <IBatchRepositoryService>(); }