public ActionResult Verify(VerifiedPersons model)
 {
     if (ModelState.IsValid)
     {
         VerifiedBLL.Add(model);
     }
     return View();
 }
Exemple #2
0
        public static void Add(VerifiedPersons person)
        {
            var dbLab = DbLayer.GetDatabase();

            var labCollection = dbLab.GetCollection<VerifiedPersons>("verified");

            var query = labCollection.AsQueryable<VerifiedPersons>().Where(e => e.StreetAddress == person.StreetAddress
                                                                                && e.ZipCode == person.ZipCode);
            if (!query.Any())
            {
                labCollection.Insert(person);
            }
        }