Ejemplo n.º 1
0
        public async Task <IActionResult> Create(PlaceViewModel placeVm)
        {
            if (ModelState.IsValid)
            {
                Place  pl     = _mapper.Map <Place>(placeVm);
                string userId = _userManager.GetUserId(User);

                await _placeProvider.CreateAsync(userId, pl);

                return(RedirectToAction("Index", new { area = "" }));
            }
            else
            {
                return(View(placeVm));
            }
        }