Exemplo n.º 1
0
        public void Create(AwardWithoutIdModel model)
        {
            var newAward = new Award
            {
                Id     = Guid.NewGuid().ToString(),
                Name   = model.Name,
                Year   = model.Year,
                GameId = model.GameId
            };

            db.Awards.Add(newAward);

            db.SaveChanges();
        }
Exemplo n.º 2
0
        public async Task <IActionResult> Create([FromBody] AwardWithoutIdModel model)
        {
            manager.Create(model);

            return(Ok());
        }
Exemplo n.º 3
0
 public void Create(AwardWithoutIdModel model)
 {
     repository.Create(model);
 }