public IActionResult Create([Bind("Id,Name,OwnerId,Address,Area,EstateType")] Estate estate) { if (ModelState.IsValid) { estate.Id = Guid.NewGuid(); estate.CreatedTime = DateTime.Now; estate.LastModified = DateTime.Now; estate.UserId = 1; estate.IsDelete = false; _estateService.InsertEstate(estate); return(RedirectToAction(nameof(Index))); } ViewData["OwnerId"] = new SelectList(_context.Owners, "OwnerId", "LastName", estate.OwnerId); return(View(estate)); }