public async Task <ShowItem> GetById(string showId) { var showItemId = new ItemId(new Guid(showId)); var service = _showServiceFactory.Get(showItemId.GetPartitionKey()); return(await service.GetByIdAsync(showItemId)); }
public async Task <bool> DeleteShow(string showId) { var showItemId = new ItemId(new Guid(showId)); var service = _showServiceFactory.Get(showItemId.GetPartitionKey()); var result = await service.RemoveAsync(showItemId); var reservationRemoveResult = await PartitionUtils.SelectManyService(_reservationServiceFactory, _partitionManager, i => i.RemoveAllWithShowIdAsync(showItemId).GetAwaiter().GetResult()); return(result && reservationRemoveResult.Any(i => i.Equals(true))); }
private IReservationService ReservationService(ItemId reservationItemId) { return(_serviceFactory.Get(reservationItemId.GetPartitionKey())); }
public IUserDataAppService CreateUserDataAppService(ItemId itemId) { var buidler = new ServiceUriBuilder(Constants.ServiceName_ProfileStateService); return(proxyFactory.CreateNonIServiceProxy <IUserDataAppService>(buidler.ToUri(), itemId.GetPartitionKey(), listenerName: Constants.ListenerName_UserDataAppService)); }