public ActionResult Index() { _aboutManager.Create("Your application description page."); _contactManager.Create("Your contact page."); return(View()); }
public async Task <ActionResult> Create([Bind(Include = "Id,Name,Email,Country")] Contact contact) { if (ModelState.IsValid) { contact.Id = Guid.NewGuid(); await contactManager.Create(contact); return(RedirectToAction("Index")); } return(View(contact)); }
public async Task <ApiResponse> Post([FromBody] ContactDto contact) => ModelState.IsValid ? await _contactManager.Create(contact) : new ApiResponse(Status400BadRequest, "Contact Model is Invalid");