public void Initialize()
        {
            var addEntryViewModel =  new AddEntryViewModel()
            {
                TagName = "TagTest",
                LocationName = "LocationTest",
                Description = "MetaTest"
            };

            _extractedEntry = addEntryViewModel.ExtractEntry();
        }
Ejemplo n.º 2
0
        public ActionResult Add(AddEntryViewModel addEntryViewModel)
        {
            if (ModelState.IsValid)
            {
                var entry = addEntryViewModel.ExtractEntry();
                entry.UserId = UserId;

                _entryService.AddEntry(entry);

                return RedirectToAction("Index", "Home");
            }
            else
            {
                return View(addEntryViewModel);
            }
        }