您好我有问题 当我尝试调用函数 GetDataById 时,方法控制器不起作用 我尝试调试但在调用方法 GetDataById 之后我无法继续
[HttpPost]
public async Task<ActionResult> CreateEmployee(RegisterModel model)
{
var d = new DistrictService();
var r = new RegionService();
var region = r.GetDataById(model.RegionId);
var district = d.GetDataById(model.DistrictId);
var user = new User
{
UserName = model.Email,
FullName = model.FullName,
Email = model.Email,
District = district,
Region = null,
Address = model.Address
};
var result = await userManager.CreateAsync(user, model.Password);
if (result.Succeeded)
{
var resOfAddRoleToUser = userManager.AddToRole(user.Id, model.Role);
await SignIn(user);
}
foreach (var error in result.Errors)
{
ModelState.AddModelError("", error);
}
}
但程序输入GetDataById方法