linq-to-sql
ISingleResult does not contain a definition for 'Single' and no extension method 'Single'
i am getting a weird error. my sproc looks like this CREATE PROCEDURE [dbo].[SaveFaq] (@Id int , @Question nvarchar(MAX) , @Answer nvarchar(MAX) , @Status nvarchar(50) , @ModifiedBy nvarchar(50))[详细]
2023-04-11 13:31 分类:问答How to retrieve the text displayed in the comobobox (winform) binded with anonymous list?
In my .net 3.5 win-form app, i am binding a combo box with these statements. using (var db = new NewspaperDataContext())[详细]
2023-04-11 12:11 分类:问答LINQ - Is there a way to get element values after grouping without ForEach?
I have an Items table that contains a CategoryId field.This is an FK into a Categories table.I want to group my Items by CategoryId and return the Items and Categories.Name.[详细]
2023-04-11 07:21 分类:问答LINQ: Get Table details
I\'m using LINQPad and I would like to know schema details of a table. I know that I do it using SQ开发者_JS百科L:[详细]
2023-04-11 05:01 分类:问答Update check' issue when updating an entity using DataContext Attach method
I\'m trying to create an update method in a generic repository as a LINQ to SQL data access layer. I have an entity like this:[详细]
2023-04-11 04:04 分类:问答Where put partial classes (linq2sql)
Im using linq2sql and I have a file DBDataClasses.dbml which contains all mapped tables. In the same namespace I have partial classes eg.:[详细]
2023-04-11 01:58 分类:问答Using IQueryable in join causes StackOverflow Exception
Does anyone know why this causes a stackoverflow exception: public IQueryable<Category> LoadCategories(bool onlyCatsWithProducts, ...)[详细]
2023-04-11 01:32 分类:问答Retrieve field values based on field name
I inherited a database in which the individual data points are stored horizontally in fields rather than vertically.In other words, in addition to other fields, each record (which represents a particu[详细]
2023-04-11 00:56 分类:问答Using XML datatype with LINQ to SQL
I want to store an xml file in my database using the XML datatype. Currently the property of the entity is XElement. I set this to a Xelement and debugging i can see that its set correctly on the enti[详细]
2023-04-10 23:06 分类:问答InvalidOperationException Occurred in Linq orderby clause
Here is the linq statement I am using: var sortedList = (from p in OriginalList where p.NValue != null orderby Math.Abs(p.NValue.Value) descending[详细]
2023-04-10 22:57 分类:问答