Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

id dublication exception c# .net core

// 2627 is unique constraint (includes primary key), 2601 is unique index
catch (UpdateException ex) when (ex.InnerException is SqlException sqlException && (sqlException.Number == 2627 || sqlException.Number == 2601))
{

}
Comment

PREVIOUS NEXT
Code Example
Csharp :: c# crud observablecollection -mvvm 
Csharp :: how to make a respaen script in unity 
Csharp :: unity roam, chase, attack states 
Csharp :: split nullable in c# 
Csharp :: how to get user control dropdown value in asp net 
Csharp :: c# get executing method name 
Csharp :: use & symbole in xml as a text using c# 
Csharp :: C# Check if variables are equal 
Csharp :: c# switch two values 
Csharp :: c# list add and return 
Csharp :: how to get the askii code of a char in c# 
Csharp :: convert bool to uint in solidity 
Csharp :: create shortcut C# WPF 
Csharp :: advance C# tricks and hits 
Csharp :: kendo razor textbox 
Csharp :: c# condition and 
Csharp :: Handle all AggregateExceptions when using Task.Whenall() async 
Csharp :: struct 
Csharp :: unity custom editor hide values in dropdown list 
Csharp :: .net core get exe path 
Csharp :: secret 
Csharp :: C# Read Excel columns header return to list 
Csharp :: Smooth Sentences c# 
Csharp :: c# convert datatable to csv 
Csharp :: maximum sum of non-adjacent 
Csharp :: c# array backwards 
Csharp :: C# String Manipulation: 
Csharp :: web scraping dynamic content c# 
Csharp :: how to mirror an image in vs forms 
Csharp :: string to date 
ADD CONTENT
Topic
Content
Source link
Name
5+8 =