public ActionResult Monster(string name, Monster updateMonster) { Monster monster = _repository.GetByName(name); if (monster != null) { monster.MonsterName = updateMonster.MonsterName; monster.Age = updateMonster.Age; monster.Description = updateMonster.Description; } return new ObjectResult<Monster>(monster); }
public ActionResult InsertMonster(Monster monster) { _repository.Insert(monster); return new ObjectResult<Monster>(monster); }