次のコードがあり、経過ミリ秒が不正確であるようです:
public async Task<ActionResult> Index()
{
try
{
var connString = RoleEnvironment.IsEmulated
? ConfigurationManager.ConnectionStrings["Poc"].ConnectionString
: ConfigurationManager.ConnectionStrings["PocVm"].ConnectionString;
var repository = new AccountRepository(connString);
var stopWatch = new Stopwatch();
stopWatch.Start();
var accounts = await repository.GetAll();
stopWatch.Stop();
ViewBag.Accounts = accounts;
ViewBag.VmStatus = stopWatch.ElapsedMilliseconds;
}
catch (Exception e)
{
blah blah blah...
}
return View();
}
これは正しいように見えますか、それとも痛々しいほど明らかな何かが欠けていますか?