public ActionResult Create(AddProperty property) { MongoCollection<ProfileProperty> mongoCollection = Database.GetCollection<ProfileProperty>("ProfileProperty"); mongoCollection.Insert(property.NewProperty); return RedirectToAction("Index"); }
public ActionResult Create() { var model = new AddProperty() { AvailablePropertyTypes = new PropertyTypeResolver().ResolveAll() .Select(x => new SelectListItem() { Text = x.Name, Value = x.Name }), NewProperty = new ProfileProperty(), }; return View(model); }