I have a small project that require a storage (I choose SQLite) and I got good result with the ADO DLL for .Net for Sqlite.
After the Install, I noticed that it contain a SQLLinq.dll. Before investigating too much effort, and because I haven't see any good example on the web, I would like to know if anyone got any good result with SQLit...
I have a Linq to Sql .dbml file which auto generates my method signatures for certain stored procedures. eg, I have in SQL spGetEmployees(@Name) so in my data context I have spGetEmployees(string Name).
Now, my underlying sp changed to add an additional parameter: spGetEmployees(@name, @count) and so I want the function in my DataConte...
Can anyone tell me what the need/advantage is to using a web service with an asp.net gui and using Linq to SQL? The web service layer seems unnecessary. Linq to SQL is completely new to me and I am researching as I am setting up a new project. Does anyone have any experience with this?
...
Hi,
I have a SQL database (SQL Server 2008) which contains the following design
ITEM
ID (Int, Identity)
Name (NVarChar(50))
Description (NVarChar(200))
META
ID (Int, Identity)
Name (NVarChar(50))
There exists a N-N relationship between these two, i.e an Item can contain zero or more meta references and a meta can be associated ...
Just when I make friends with LINQ to SQL, it appears as though MS is pulling the rug out from under it.
http://blogs.msdn.com/adonet/archive/2008/10/29/update-on-linq-to-sql-and-linq-to-entities-roadmap.aspx
From my little bit of research, EF is way overkill for simple work. But after this announcement is there a point in continuing ...
I have two tables say, t1 and t2 that have t1.t1_id and t2.t2_id as primary keys. They are related by table t3 with columns t3.t1_id and t3.t2_id, respectively. Using LINQ I get an EntitySet<t3> on class t1 and t2, but what I want is an EntitySet<t2> on class t1 and EntitySet<t1> on class t2. How do I do this?
...
I am starting new project with SqlServer and Linq to Sql.
What data type would be better for surrogate keys in tables: identity or uniqueidentifier ?
As I understood, identity is automatically generated on insert, while uniqueidentifier should be generated in code (GUID).
Are there any significant performance differences?
e.g. ident...
I'd like to return an object with the following signature
class AnonClass{
string Name {get;}
IEnumerable<Group> Groups {get;}
}
I have tried the following query, but g only returns a single entity, not all the joined entities
var q = from t in dc.Themes
join g in dc.Groups on t.K equals g.ThemeK
select new {t.Name, Groups =...
I'm trying to write some LINQ To SQL code that would generate SQL like
SELECT t.Name, g.Name
FROM Theme t
INNER JOIN (
SELECT TOP 5 * FROM [Group] ORDER BY TotalMembers
) as g ON t.K = g.ThemeK
So far I have
var q = from t in dc.Themes
join g in dc.Groups on t.K equals g.ThemeK into groups
select new {
t.Name, Groups = (fr...
I am trying to populate a dropdown list control on an web page using VS 2008 and keep getting an error that it can't load the DataContext. My backend is a SQLx server 2005 DB. I create a Link To SQL data context and have 1 table in it. My LinKDataSource is as follows -
asp:LinqDataSource ID="LinqDataSource1" runat="server"ContextTy...
I have been searching for recent performance benchmarks that compare L2S and EF and couldnt find any that tested calling stored procedures using the released version of EF. So, I ran some of my own tests and found some interesting results.
Do these results look right? Should I be testing it in a different way?
One instance of the conte...
I'm working on adding globalization to my product cataloge and I have made it work. However, I feel that the underlaying SQL query isn't performing as well as it could and I could need some advice on how to change my Linq To SQL query to make it more efficient.
The tables that are used
Product contains a unique id for each product. Thi...
Question
I'm sure many of you have been faced by the challenge of localizing a database backend to an application. If you've not then I'd be pretty confident in saying that the odds of you having to do so in the future is quite large. I'm talking anout storing multiple translations of texts (and the same can be said for currency etc.) f...
So here I am just about to start a big project using LINQ to SQL and then I read this:
Is LINQ to SQL Truly Dead? by Jonathan Allen for InfoQ.com
Well, I don't want to be supporting LINQ to SQL indefinitely if it's a dead end. So, how should I get started learning about ADO.NET Entity Framework?
...
On Linq to SQL's DataContext I am able to call SubmitChanges() to submit all changes.
What I want is to somehow reject all changes in the datacontext and rollback all changes (preferable without going to the database).
Is this possible?
...
I have started using Linq to SQL in a (bit DDD like) system which looks (overly simplified) like this:
public class SomeEntity // Imagine this is a fully mapped linq2sql class.
{
public Guid SomeEntityId { get; set; }
public AnotherEntity Relation { get; set; }
}
public class AnotherEntity // Imagine this is a fully mapped linq2sql c...
I am trying to get my head around a LINQ issue. The ultimate goal is to load tree view with data acquired from LINQ to SQL (view). The issue is when I try to access the data acquired it keeps throwing a "query operator not supported during runtime". The code involved is no more than:
Dim tasklistdata As New lqDataContext
Dim Use...
Hi,
I have a fairly standard inheritance situation in my current LINQ-to-SQL project. I have a base class called 'Party' and classes called 'Individual' and 'Organisation' which inherit from it.
What I want to achieve seems (and probably is) fairly simple. I want to return a list of 'Organisations' sorted by Company Name. The problem i...
I've been playing around with Linq to Sql, but i've come accross a problem when defining associations between entities.
I have 2 tables, 1 is a table containing customer transactions and the other is a lookup table containing transaction types. For example, a transaction can be type 'CASH' and the value in the lookup table will have a p...
Is it possible to obtain the maximum column length for a VARCHAR, CHAR etc?
...