Beispiel #1
0
        public async Task <Game> Import(GameSpecImport model)
        {
            var yaml = new DeserializerBuilder()
                       .WithNamingConvention(CamelCaseNamingConvention.Instance)
                       .IgnoreUnmatchedProperties()
                       .Build();

            var entity = yaml.Deserialize <Data.Game>(model.Data);

            await Store.Create(entity);

            return(Mapper.Map <Game>(entity));
        }
Beispiel #2
0
 public async Task <Game> ImportGameSpec([FromBody] GameSpecImport model)
 {
     return(await GameService.Import(model));
 }