Skip to content

Tag: lambda

Update value if exist or insert in SQL with C# linq

I have this code which is working fine and I update a value if exists or insert if not With this code I manage to do the work with only one query to the SQL, but I was wondering if there is an easier or more elegant way to do it. For example if I could use linq and lambda

How do I get a space in my property name?

I have the following query: The problem is that I make the property ProjeAdı in the Select clause. I want the property to match the sql column, Proje Adı (note the space). How can I do that? Answer aliases cant have spaces between them , just like any variable name cant have white space, they are considered a…