EntityFramework.Exceptions simplifies this by handling all the
database specific details and throwing different exceptions. All you
have
to do is inherit your DbContext
from ExceptionProcessorContext
and handle the exception(s) such as UniqueConstraintException
,
CannotInsertNullException
, MaxLengthExceededException
, NumericOverflowException
you need.
مطالب مشابه
- اشتراکها
مدیریت بهتر استثناءهای صادر شده توسط Entity Frameworkاشتراکها
بررسی تاثیر صدور استثناءها بر روی کارآیی برنامهاشتراکها
آموزش ساخت اپلیکیشن های تجاری با WPF, MVVM, and Entity Framework Code Firstاشتراکها
خبرنامه هفتگی NET Stacks.اشتراکها
شروع به کار با Visual Studio 2017اشتراکها
معرفی پلتفرم یکپارچهای برای تولید رابط کاربری برنامههای چندسکویی مبتنی بر NET.اشتراکها
صدور استثناء برای اعتبارسنجی دادهها؛ بلی یا خیر؟اشتراکها
10 آموزش برتر پروژه محور برای یادگیری HTML / CSS / Javascriptنظرات مطالب
C# 6 - Exception Filteringنظرات مطالب
ارتقاء به ASP.NET Core 1.0 - قسمت 7 - کار با فایلهای config