Ejemplo n.º 1
0
 public ShabbatDto(Shabbat.Occasion shabbat)
 {
     if (FSharpOption <string> .get_IsSome(shabbat.Id))
     {
         Id = new ObjectId(shabbat.Id.Value);
     }
     Date     = shabbat.Date;
     Title    = shabbat.Title;
     Openings = shabbat.Openings.Select(o => new Opening(o)).ToList();
 }
Ejemplo n.º 2
0
 public async Task CreateAsync(Shabbat.Occasion shabbat)
 {
     IMongoCollection <ShabbatDto> collection = GetDbCollection();
     await collection.InsertOneAsync(new ShabbatDto(shabbat));
 }