예제 #1
0
 private Character GetCharacterFromModel(CharacterViewModel viewModel)
 {
     return(new Character
     {
         Id = viewModel.Id,
         Name = viewModel.Name,
         Description = viewModel.Description,
         Gender = context.GetGender(int.Parse(viewModel.GenderId)),
         Race = context.GetRace(int.Parse(viewModel.RaceId))
     });
 }