1
vote
0answers
63 views

Linq to SQL for EntityFramework.Extensions Update() method with ?? operator

I have a method with several optional parameters that then updates the database using a LINQ query. I would like to update the record such that the optional fields are only saved if they were supplied ...
0
votes
1answer
17 views

Sql Recursion via CTE over LINQ SelectMany

Firstly I'm fairly well versed in LINQ queries, but a complete novice at writing direct SQL queries. I want to be able to do the following: For any given ItemId, loop through it's child Items until ...
1
vote
0answers
44 views

Local database changes not saved after SubmitChanges()

I'm using local database to store my data. I have file *.sdf which I load from Isolated Storage, because I want my application to work also in offline mode, so if user doesn't want, he doesn't have to ...
0
votes
2answers
37 views

Cannot open user default database. Login failed.for user

I built a windows forms application project and connected a SQL Server database using Linq-to-SQL. Everything worked properly until this error appeared : Cannot open user default database. Login ...
0
votes
1answer
42 views

linq to stored procedures multiple select

MSDN docs say that I can write a stored procedure like this CREATE PROCEDURE MultipleResultTypesSequentially AS select * from products select * from customers then read it from LINQ like this ...
1
vote
1answer
22 views

Bind a view to wpf datagrid

When know that a view represent a select command, if we use a view to bind it to a data grid using linqtosql,i want to know when the command sql will be executed is it when the window wpf is ...
-1
votes
0answers
28 views

Linq to SQL unable to get objects of classes [closed]

I'm using Visual Studio 2012 and I have implemented a database using SQL Server 2012. Then I added a Linq-to-SQL .dbml file to my project, and dragged all my tables onto it. Normally I would then be ...
0
votes
0answers
29 views

LINQ to SQL relationships using compact edition

I'm having a problem trying to use linq to sql to create a relationship between my two database entities. I've been following this basic Microsoft guide but without getting it to work. I'm trying to ...
0
votes
0answers
52 views

Overlapping nullable foreign keys in LINQ to SQL associations

I'm dealing with a common address object in LINQ to SQL that contains a country and a state, both of which participate in foreign key relationships to country and state tables. The country will always ...
-1
votes
2answers
54 views

Study material for Linq [closed]

Where can I get study material for Linq? Actaully there is code available for linq in Sql expression like :: from m in DB.tbl1 join n in DB.Tbl2 on m.fkId equals n.PkId join o in DB.Tbl3 on ...
0
votes
1answer
118 views

Foreign key to values using Linq

I have a webpage and site using Linq. The page contains a gridview which shows customers and bound by a List (Of Customer). I use the below code to get a single customer Public Function ...
1
vote
1answer
47 views

How to improve Linq-To-Sql code

Using the StackExchange.Profiling.MiniProfiler class to profile an ASP.NET MVC application with Linq-To-Sql as ORM. I'm trying to reduce one action to one SQL, so that I don't have any duplicates ...
0
votes
2answers
67 views

aggregation result from SQL view to gridview

I have this View from multi tables account_name.......bonus..........value customer1............A............14000 customer1............B............500 customer1............C............14500 ...
1
vote
1answer
58 views

Linq to sql - Join 2 tables, select 1 row from right table with a 1 to many relationship

I am trying to select the forum categories and the last post in each respective category. I have been able to accomplish this in SQL using OUTER APPLY, but haven't been able to successfully convert ...
0
votes
2answers
58 views

unique column of type nvarchar

I have a simple table: File: path | deleted | categories | description I want to use the table for a Linq to SQL entity model. On the model, that column path (which is string there, nvarchar in ...

1 2 3 4 5 57
15 30 50 per page