Created
August 15, 2011 19:25
-
-
Save cbcwebdev/1147521 to your computer and use it in GitHub Desktop.
Wizard.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class WizardViewModel | |
{ | |
public StepOne StepOne | |
{ | |
get; | |
set; | |
} | |
// | |
// ... other steps saved for brevity | |
// | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class StepOne | |
{ | |
[Remote("Tenant", "Validation", "Api", "host", ErrorMessage = "The provided host already exists.")] | |
public string Host | |
{ | |
get; | |
set; | |
} | |
// | |
// ... other properties saved for brevity | |
// | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ValidationController : Controller | |
{ | |
private readonly ITenantService _tenantService; | |
public ValidationController(ITenantService tenantService) | |
{ | |
_tenantService = tenantService; | |
} | |
public ActionResult Tenant(string host) | |
{ | |
var tenant = _tenantService.FindByHost(host); | |
return Json(tenant == null, JsonRequestBehavior.AllowGet); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment