Parameters supplied is incorrect – Entity Framework Designer

February 17, 2010

I have faced this error – “Parameters supplied is incorrect”, several times while opening my Entity Model file (.edmx) file using Entity Designer in Visual Studio 2008.

While there is no really sensible explanation to why this error occurs, most of the time it is because of the associations and navigation links get corrupt in the designer. If you open the edmx file using XML editor – (Right click on the file in the Visual Studio Solution Explorer, “Open With”, Select “XML Editor”, and click “Ok”) , you will find the following section at the bottom of the file.

<edmx:Diagrams>
<Diagram Name=”…”  ….. > </Diagram>
</edmx:Diagrams>
Delete the section <Diagram Name=”…”  ….. > </Diagram>. Then save the file and open in the designer. In all cases, it solved my problem.
Hope this helps.
Cheers,
Techie55

Coding Best Practices Using DateTime in the .NET Framework

February 3, 2010

Most of us have been working or have worked with DateTime data type in .NET at some point in our career. However, I am not too sure how many of us, including me, know/knew how to use DateTime data types in enterprise level applications.

Just stumbled upon a very good article regarding best practices to be followed when using DateTime in .NET. Its an old post. So it does not consider the new DateTimeOffset datatype which was introduced in .NET 3.5 (I think its 3.5).

http://msdn.microsoft.com/en-us/library/ms973825.aspx

LINQ to SQL vs Entity Framework

February 2, 2010

Good link summarizing the differences between LINQ to SQL and Entity Framework

http://www.osellus.com/blogs/2009/06/04/linq-to-sql-vs-entity-framework/

Inserting Many to Many Relationships in EF with or without a Join Entity

February 2, 2010

For all those of you who have been wondering like me, on how to manage many-to-many relationships in .NET entity framework, here is a good article on how .NET Entity Framework manages many-to-many relationships.

http://thedatafarm.com/blog/data-access/inserting-many-to-many-relationships-in-ef-with-or-without-a-join-entity/


Follow

Get every new post delivered to your Inbox.