public IActionResult AddArea(Area area) { if (ModelState.IsValid) { if (area.MemberId == 0) { area.MemberId = gardenCommunityId; } area.OwnedFrom = DateTime.Now; var member = memberProvider.GetMember(area.MemberId); area.Members.Add(member); areaProvider.AddArea(area); return(RedirectToAction("GetAreas", "Area")); } return(View(area)); }