public HttpResponseMessage PostRegionCollection(APISignedRequest request) { CompetitionModel comp; var regionCollection = GetRequestParameter <API_RegionCollection>(request, out comp); List <RegionModel> savedRegions = new List <RegionModel>(); foreach (var arm in regionCollection.Data) { savedRegions.Add(SaveOneRegion(arm, comp)); } db.SaveChanges(); API_RegionCollection res = new API_RegionCollection { Data = savedRegions.Select(r => r.ToApi()).ToArray() }; return(Request.CreateResponse <API_RegionCollection>(HttpStatusCode.Created, res)); }
public AsyncRequestResult BeginPostRegionCollection(API_RegionCollection regions, RequestCompleted <API_RegionCollection> callback, Object asyncState) { return(BeginPostSerializableT("Calendar", "PostTeamCollection", String.Empty, regions, callback, asyncState, true)); }
public API_RegionCollection PostRegionCollection(API_RegionCollection regions) { return(PostSerializableT("Calendar", "PostTeamCollection", String.Empty, regions)); }