Answered by:
EF and Elmah

Question
-
Hello,
I am using Elmah for error logging but instead of using SQL procedures I would like to use EF and Linq.
For that I need to override three methods of Error Log class: Log, GetError and GetErrors.
There is a sample which is SQLErrorLog:
http://www.google.com/codesearch/p?hl=en&sa=N&cd=1&ct=rc#ols26SOMVz0/trunk/src/Elmah/SqlErrorLog.cs&q=sqlerrorlog%20package:http://elmah\.googlecode\.com
I would like to do the same but using Linq to Entities but I am completely lost.
Does anyone ever did this?
Thanks,
MiguelThursday, August 6, 2009 11:15 PM
Answers
-
Hi Miguel,
Welcome to MSDN Forums!
Entity Framework and LINQ to Entities are really good for database applications. However, the Elmah is a third party project or library which is out of our support scope and we are not familiar with what the functions of Elmah.
Here are some references about EF’s entity tracing and caching features & debugging and troubleshooting tips:
http://blogs.msdn.com/jkowalski/archive/2009/06/11/tracing-and-caching-in-entity-framework-available-on-msdn-code-gallery.aspx
http://www.scip.be/index.php?Page=ArticlesNET13
http://blogs.msdn.com/jkowalski/archive/2008/03/24/tips-and-tricks-for-debugging-your-entity-framework-provider.aspxHope these help.
Have a nice day!
Best Regards,
Lingzhi
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.- Marked as answer by Yichun_Feng Friday, August 14, 2009 1:38 AM
Tuesday, August 11, 2009 3:12 PM
All replies
-
Hi Miguel,
Welcome to MSDN Forums!
Entity Framework and LINQ to Entities are really good for database applications. However, the Elmah is a third party project or library which is out of our support scope and we are not familiar with what the functions of Elmah.
Here are some references about EF’s entity tracing and caching features & debugging and troubleshooting tips:
http://blogs.msdn.com/jkowalski/archive/2009/06/11/tracing-and-caching-in-entity-framework-available-on-msdn-code-gallery.aspx
http://www.scip.be/index.php?Page=ArticlesNET13
http://blogs.msdn.com/jkowalski/archive/2008/03/24/tips-and-tricks-for-debugging-your-entity-framework-provider.aspxHope these help.
Have a nice day!
Best Regards,
Lingzhi
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.- Marked as answer by Yichun_Feng Friday, August 14, 2009 1:38 AM
Tuesday, August 11, 2009 3:12 PM -
You can use Elmah.Contrib.EntityFramework nuget package built on top of SqlErrorLog.
- Proposed as answer by abatishchev Wednesday, March 19, 2014 2:48 AM
Wednesday, March 19, 2014 2:47 AM