public async void Save(ApplicationForm form)
 {
     var fme = new FormMongoEntity(form);
     var collectiuon = GetCollection();
     await collectiuon.FindOneAndReplaceAsync<FormMongoEntity>(f => f.Name == form.Name && f.Class == fme.Class,
         fme, new FindOneAndReplaceOptions<FormMongoEntity, FormMongoEntity>
         {
             IsUpsert = true,
         });
 }
Ejemplo n.º 2
0
        public FormEntity(FormMongoEntity form)
        {
            RowKey = form.Name;
            PartitionKey = form.Class.ToString();

            Gender = form.Gender;
            Email = form.Email;
            Phone = form.Phone;
            QQ = form.QQ;
            Weibo = form.Weibo;
            Groups = form.Groups;
            Description = form.Description;
        }