Пример #1
0
 public static Game ToGame(this GameDto gameDto)
 {
     if (!MongoIdValidator.Check(gameDto.id))
     {
         gameDto.id = ObjectId.Empty.ToString();
     }
     return(new Game
     {
         Id = new ObjectId(gameDto.id),
         Title = gameDto.title,
         Genre = gameDto.genre
     });
 }
Пример #2
0
 private bool CheckId(string id)
 {
     return(MongoIdValidator.Check(id));
 }