private static MemoryBookUniverse CreateEntity(MemoryBookUniverseCreateModel model)
        {
            Contract.RequiresNotNull(model, nameof(model));

            return(new MemoryBookUniverse
            {
                Name = model.Name,
                CreatedDate = DateTime.UtcNow
            });
        }
Example #2
0
        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());
        }