public void Create(LocalRegisterRequestModel register) { LocalEntity c = new LocalEntity { Descricao = register.Descricao, Endereco = register.Endereco }; _dbContext.LocalEntity.Add(c); _dbContext.SaveChanges(); }
public RedirectToActionResult Create(LocalRegisterRequestModel local) { _localService.Create(local); TempData["MensagemSucesso"] = "Cadastro efetuado com sucesso!"; return(RedirectToAction("Locais")); }