Can I use ELMAH to log exceptions which occurs in Entity framework classes?

StackOverflow https://stackoverflow.com/questions/13132606

  •  15-07-2021
  •  | 
  •  

سؤال

I have two separate projects, one for EF and another for MVC. And added reference of EF project to MVC project.

Now, I am trying to use ELMAH to log errors from MVC application, and it's working fine with MVC exceptions. But I have one question, if any exception occurs in EF classes then can elmah will log that?

هل كانت مفيدة؟

المحلول

I think, I asked very simple question in curiosity. I used elmah to log errors from mvc application. My mvc application uses EF as ORM.

To log errors which occurs at EF, I used try-catch, with throw. Which pass errors to mvc application.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top