public async override Task CreateAsync(GalleryMap galleryMap) { CloudTable masterTable = await GetMasterTable(); var insertOperation = TableOperation.Insert(GalleryMapEntity.From(galleryMap)); await masterTable.ExecuteAsync(insertOperation); }
public async override Task <GalleryMap> GetAsync(MapShortName shortName) { CloudTable masterTable = await GetMasterTable(); var getFromShortNameOperation = TableOperation.Retrieve <GalleryMapEntity>(GalleryMapEntity.MasterPartitionKey, GalleryMapEntity.CreateCanonicalShortName(shortName)); var retrieveResult = await masterTable.ExecuteAsync(getFromShortNameOperation); var m = retrieveResult.Result as GalleryMapEntity; return(new GalleryMap( m.MapString, m.ShortName, m.Description, m.Players, Enum.Parse <MapQuality>(m.MapQuality ?? "Community", true), m.Category ?? "", new Owner("N/A", m.OwnerId ?? "", m.OwnerIdentityProvider ?? "", "N/A", true))); }