Entity Framework mergeoption notracking bad performance

If you disable change tracking by setting the NoTracking merge option you save the performance costs of attaching objects to the contexts but on the other hand you also lose identity management. This means that potentially much more objects – many with the same key – will be materialized. Example: Suppose you have a User … Read more

Doesn’t Linq to SQL miss the point? Aren’t ORM-mappers (SubSonic, etc.) sub-optimal solutions?

Let me preface this by saying that I am a dyed-in-the-wool database guy. As a gross over-generalization: Developers don’t know SQL. Developers don’t really want to know SQL. They can write it, they can design tables, but it makes them feel icky. They tend to do stupid things when the necessary query is more than … Read more

Error 3002: Problem in mapping fragments | c# linq to entities

Your entity model has the combination of the two properties FTPRuns.ID and FTPRuns.LastRun as entity key while your table has only the column FTPRuns.ID as primary key. So in your model you specify that the combination of FTPRuns.ID and FTPRuns.LastRun must be unique while your database has the stronger requirement that FTPRuns.ID alone must be … Read more

LEFT JOIN in LINQ to entities?

Ah, got it myselfs. The quirks and quarks of LINQ-2-entities. This looks most understandable: var query2 = ( from users in Repo.T_Benutzer from mappings in Repo.T_Benutzer_Benutzergruppen .Where(mapping => mapping.BEBG_BE == users.BE_ID).DefaultIfEmpty() from groups in Repo.T_Benutzergruppen .Where(gruppe => gruppe.ID == mappings.BEBG_BG).DefaultIfEmpty() //where users.BE_Name.Contains(keyword) // //|| mappings.BEBG_BE.Equals(666) //|| mappings.BEBG_BE == 666 //|| groups.Name.Contains(keyword) select new { UserId … Read more

“The LINQ expression node type ‘Invoke’ is not supported in LINQ to Entities” – stumped!

I was getting this very error and I’m using Entity Framework with PredicateBuilder by Joe Albahari to build dynamic where clauses. If you happen to be in the same condition, you should call the AsExpandable method: If querying with Entity Framework, change the last line to this: return objectContext.Products.AsExpandable().Where(predicate); This method is part of LINQKIT … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)