我有一个应用程序,其中我使用实体框架6 。我有这个片段:
exports.notFound = function(req, res, next) {
res.status(404);
res.render('not-found'); // localized in /views/not-found.ejs or .html
};
// for regex error
exports.serverError = function(error, req, res, next) {
res.status(500);
res.render('server-error', {error: error});
};
用这种方法:
app.error(function(err, req, res, next){
if (err instanceof NotFound) {
res.render('404.jade');
} else if (err instanceof ServerError ){ // for regex error
res.render('server-error.jade', {error: err});
} else {
next(err);
}
});
我得到了输出:
Action empBasicAction;
Console.WriteLine("Loading context1 ......");
empBasicAction = () => { Model1 contexte = new Model1(); };
Console.WriteLine("end of loading, time = " + CalculateTime(empBasicAction));
Console.WriteLine("Loading context2 ......");
empBasicAction = () => { Model1 contexte = new Model1(); };
Console.WriteLine("end of loading2, time = " + CalculateTime(empBasicAction));
Console.WriteLine("Selection1......");
empBasicAction = () =>
{
Model1 contexte1 = new Model1();
contexte1.aspnet_Users.Count();
};
Console.WriteLine("end selection, time= " + CalculateTime(empBasicAction));
Console.WriteLine("Selection2 ......");
empBasicAction = () =>
{
Model1 contexte1 = new Model1();
contexte1.aspnet_Users.Count();
};
Console.WriteLine("end selection2, time = " + CalculateTime(empBasicAction));
我不理解输出结果的含义:我的意思是:
你能帮助我吗,
谢谢,