public async Task <long> CreateExampleEntity(IEndpointContext context, DataModel.ExampleEntity entityData) { var request = new Messages.CreateExampleEntityDataRequest(entityData); var response = await context.ExecuteAsync <Messages.CreateExampleEntityDataResponse>(request).ConfigureAwait(false); return(response.CreatedId); }
public async Task <bool> UpdateExampleEntity(IEndpointContext context, [EntityKey] long key, DataModel.ExampleEntity updatedEntity) { var request = new Messages.UpdateExampleEntityDataRequest(key, updatedEntity); var response = await context.ExecuteAsync <Messages.UpdateExampleEntityDataResponse>(request).ConfigureAwait(false); return(response.Success); }