What are the major differences between Data Access Application Block, NHibernate, ADO.NET Entity Framework and LINQ to SQL with respect to performance, business logic, scalability and flexibility?
...
How does NHibernate provide out of the box features as compared to the other OR/M tools available like ADO.NET entity framework and LINQ to SQL?
...
I google around unit testing LINQ to SQL and people are using MockDatabase class where we have list and add data to those Lists.
This will fit in the scenarios where we dont have relationships.
I am behind using some data or mdf file in the unit test project which will have the same structure as like my actual database with all relation...
Hello
I have a problem where I call a stored proedure twice, each with different parameters and I need 2 seperate lists but linq is caching the data and also giving me the error above
I have tried 2 different methods to get round the error message, one using ToList() on tbl and the other manually walking through the data
My code is sh...
HI ,
The designer creates Entity classes as partial when using LINQ to SQL and the Entity Framework. Is there some way we can create the Entity classes as .cs physical files while using LINQ to SQL or the Entity Framework
...
I have a table "Users"..
it has a column "ShowData"
using linq-sql how can I loop through every user and set ShowData to false for each user..
thanks
...
Hey,
I'm using Linq to SQL for my DAL and have heard various things about using static methods in a web application (regarding threading/concurrency issues). At the moment, I created a test DAL, which seems to be functioning fine. However, are there any problems with the way I've created it, since it's static?
public static class ...
How do i change order of properties in DBML file (L2S)
I really do not want delete and then re-drop my table from database
...
I'm trying to convert DataTable to Linq
using
DIm result = From r in dt.AsEnumerable()
Select new ( col1 = r.Field<integer>("id"), col2 = r.Field<string>("desc"))
But i get error near 'new (' saying type expected.
What is wrong with this query?
...
I am trying to best figure out a way to store this particular case of data in a static database table
on the front end the user will be presented with a simple table (say 5x5 by default) but the user can expand or delete rows/ columns at will.
The idea is that the first column will be labels that are the same as the headers, similar to...
I have a LINQ TO SQL query which retrieves all the users along with their roles:
var userRoles = from u in db.GetTable<User>()
join ur in db.GetTable<UserRole>()
on u.UserID equals ur.UserID
join r in db.GetTable<Role>()
...
Hi everybody!
I'm having a hard time figuring out how to translate this simple SQL statement to (c#) linq to SQL :
SELECT table1.vat, SUM(table1.QTY * table2.FLG01 + table1.QTY * table2.FLG04)
FROM table1
inner join table2 on table2.key= table1.key
where '2010-02-01' <= table1.trndate and table1.trndate <= '2010-02-28'
Group by ta...
Hi,
We are developing desktop application in vs2008 with winforms and sql server 2008.At present, we make lot of dbase calls(linq to sql) on form load, so this make the application real slow.One option is to load all the data required at the start of application load, and store it in a cache(just static collections).What other options w...
Hello,
Let's say I have two tables (Address and Phone) in sql which have one-to-one relationship. I have created corresponding linq to sql classes and changed the association to OneToOne
I want to retrieve both objects by filtering child object. e.g I have the following query which works fine:
var n = db.Addresses.Where(t => t.Phone.N...
Suppose I have written a class Customer which has it attributes as Name, Age, designation etc. And I have a table also as customer with the same attributes.
Now I dont want to use the designer provided that generates the entity classes for me.
Is it possible for me to map the Customer.cs to the table customer while using LINQ to SQL as...
Can someone convert this query to linq2sql for me? Trying to teach myself linq to see if I want to use it for a small project, and getting hung up on the smallest details...
SELECT
Warrant.ID,
Warrant.MeetingDate,
Warrant.MeetingType,
Warrant.Notes,
COUNT(WarrantArticles.ID) AS Cnt
FROM Warrant INNER JOIN WarrantArticles...
Hello everybody!
I want to translate this simple SQL statement to linq-to-sql:
SELECT SUM(field1), SUM(field2)
FROM TableName
The closest linq-to-sql is (i think) using the group by clause:
from tbl in TableName
group tbl by (1) into g
select new{ value1= g.Sum(p => p.field1), value2 = g.Sum(p => p.field2)};
As this does not produ...
Disclaimer: Bit of a C# newbie - first Software Dev gig in awhile after being in QA for a couple years.
I realize flavors of this question have been asked before (inheritance in LINQtoSQL and the like), but I'm hoping I ask the question differently.
In my database, I will have a super-type of "Event" and multiple sub-types: Conferenc...
Hi,
I have a table called currency.Now, the id of this table is a fk in many tables.Now,when I load currency(using linq to sql currency.tolist()), the data of one association is loaded.I don't understand why is it so.I don't want to load data of any association.How can I do this?
...
I've inherited this project from the previous guy, and I'm presently in the process of switching over a number of assembled-from-string SQL queries into LINQ to SQL, which I'm told is what makes life in .NET worth living. However, I'm running into problems filtering a Many-to-Many relationship.
The system is a Project Management intr...