public async Task <ActionResult> Index(Contact contact, string lang) { var model = new HomePageModel(); try { if (ModelState.IsValid) { int b = await DbAdaptor.CreateContactAsync(contact); if (b > 0) { //ToDo check int ViewBag.SendMessage = Resources.Resource.Message_sent; ModelState.Clear(); } } model.TeamMembers = await DbAdaptor.GetTeamMembersAsync(cultureName); model.Projects = await DbAdaptor.GetProjectsFullAsync(cultureName); } catch (Exception) { ViewBag.SendMessage = Resources.Resource.Message_not_sent; } return(View(model)); }