private static MemoryBookUniverse CreateEntity(MemoryBookUniverseCreateModel model) { Contract.RequiresNotNull(model, nameof(model)); return(new MemoryBookUniverse { Name = model.Name, CreatedDate = DateTime.UtcNow }); }
public async Task <Guid> CreateUniverse(string universeName) { Contract.RequiresNotNullOrWhitespace(universeName, nameof(universeName)); var createModel = new MemoryBookUniverseCreateModel { Name = universeName }; var ids = await this.memoryBookUniverseCommandManager.CreateMemoryBookUniverse(createModel) .ConfigureAwait(false); return(ids.First()); }