Exemplo n.º 1
0
        public async Task <JsonResult> VerifyNewStateName([Bind(Include = "CountryID, Name, Abbreviation")] State state)
        {
            bool StateUnique = await _geoRepository.ValidateStateUnique(state);

            if (StateUnique)
            {
                return(Json(new { success = true, responseText = "Ok" }));
            }
            else
            {
                return(Json(new { success = false, responseText = "State already exists for this Country!" }));
            }
        }