Пример #1
0
        public Metadata Add(VmGame model)
        {
            long id = this.GetUserId();

            model.AuthorId = id;
            this._service.AddGame(model);
            return(new Metadata(id.ToString()));
        }
Пример #2
0
        public void AddGameShouldSuccess()
        {
            var model = new VmGame
            {
                Name        = "snake",
                Category    = GameCategory.Relax,
                Description = "des",
                Rule        = "rule",
                Id          = 1,
                AuthorId    = 2,
                Author      = "test"
            };

            try
            {
                this._service.AddGame(model);
            }
            catch
            {
                throw;
            }
        }