linq-to-sql
Why do I get a DuplicateKeyException in Linq2Sql after I checked for the keys existence?
I have a program that adds a lot of new data to a database using Linq2SQL. In order to avoid DuplicateKeyExceptions, I check for the existence of the key, before trying to add a new value into the da[详细]
2023-04-08 06:43 分类:问答Repository Pattern and MVC help
I\'m new to C# and ASP.NET MVC and i\'m trying to understand the repository pattern.I\'ve read a whole lot of articles, but I just don\'t understand how to use it.I\'m currently using LINQ to SQL to a[详细]
2023-04-08 06:05 分类:问答Using LINQ to SQL to update database?
When I execute the following code I don\'t get any error, but it doesn\'t update the changes on the database either. I have 5 entries in the table user, and after executing the following code there is[详细]
2023-04-08 04:12 分类:问答EF4 how can I convert anonymous type to strong type in LINQ
The LINQ code returns a anonymous type how can I return a strong type of \"Customers\"? I am returning a anonymous type as I only want to select certain fields from the entity.[详细]
2023-04-08 04:00 分类:问答LINQ query records based on date array
I have a table (I am using Entity Model) and filtered that table using LINQ query which is working fine.[详细]
2023-04-08 00:42 分类:问答What would it take to create a C# compilation error, when you use custom methods where Expression is expected?
What would it take to create a C# compilation error, when you use custom methods where Expression is expected?[详细]
2023-04-07 20:15 分类:问答Smarter where clause?
I\'ve been experimenting with LINQ to SQL recently and have a quick question. The basic premise is I have a search request which contains a Make and Model which I use to search a DB containing cars.[详细]
2023-04-07 15:17 分类:问答Bind Session field to System.Data.Linq.Binary
It\'s a picture, an array of bytes which is in the Session. I can\'t seem to bind it to the automatically created model for my table, inside my DataContext. I\'m trying to do so using a FormView and a[详细]
2023-04-07 12:51 分类:问答.NET exception not caught
I have a function that looks like this: try { _dbManager.InsertSearch(some data); } catch (Exception ex) { //do logging[详细]
2023-04-07 12:24 分类:问答Is it better to use linq2sql to generate classes for stored procedures, or to call the stored procedures directly?
I see tons of questions on LINQ to SQL vs Stored Procs. I\'m more curious about the benefits of using them in tandem as relates to object mapping.[详细]
2023-04-07 12:24 分类:问答