Сравнение ado.net entity framework с nhibernate

of 14 /14

Author: tamyra

Post on 18-Feb-2016

112 views

Category:

Documents


0 download

Embed Size (px)

DESCRIPTION

Сравнение ADO.NET Entity Framework с NHibernate. Роман Здебский Эксперт по технологиям разработки ПО Microsoft [email protected] http://blogs.msdn.com/roman. NHibernate. ORM solution for the Microsoft .NET NHibernate free open source - LGPL - PowerPoint PPT Presentation

TRANSCRIPT

1 ADO.NET Entity Framework NHibernate [email protected]://blogs.msdn.com/roman

Microsoft TechDayshttp://www.techdays.ru 9/3/2008 7:13 PM 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

2NHibernateORM solution for the Microsoft .NETNHibernate free open source - LGPLNHibernate Java O/R HibernateNHibernate 1.0 - 2005NHibernate 1.2.1, released in November 2007,support for .NET 2.0, stored procedures, generics, and nullable typesNHibernate 2.0 - August 23, 2008. Hibernate 3.2POCOHQL LINQ provider RTM planned for 2.1 (hopefully)

Microsoft TechDayshttp://www.techdays.ru 3Language Integrated Query IEnumerable (Select, OrderBy, GroupBy, Join, Where) (IEnumerable)Intellisense,

Microsoft TechDays9/3/2008 7:13 PM4 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.C# 3.0var contacts = from c in customers where c.State == "WA" select new { c.Name, c.Phone };var contacts = customers .Where(c => c.State == "WA") .Select(c => new { c.Name, c.Phone });Extension methodsLambda expressionsQuery expressionsObject initializersAnonymous typesLocal variable type inferenceMicrosoft TechDays9/3/2008 7:13 PM5 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.Entity Framework 11 2008.NET Framework 3.5 SP1 .NETVisual Studio IDE Entity Data ModelObjectContext LINQMicrosoft TechDayshttp://www.techdays.ru 6 NHibernate , NHibernate.dll web.config hibernate.cfg.xml POCO xml mapping .hbm.xml

ADO.NET Entity Framework

http://www.hibernate.org/hib_docs/nhibernate/1.2/reference/en/html/quickstart.html#quickstart-intro Microsoft TechDayshttp://www.techdays.ru 7Entity Framework Microsoft TechDayshttp://www.techdays.ru 9/3/2008 7:13 PM 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

8LINQ + Entity FrameworkC# 3.0VB 9.0.NET Language Integrated QueryLINQ toDataSetsLINQ toEntitiesLINQ toObjectsLINQ toXML

XMLLINQ toSQL

Entity Framework

(CSDL)Microsoft SQL Server, Oracle, DB2, MySQL (MSL) (CSDL)ADO.NETMicrosoft TechDayshttp://www.techdays.ru 9/3/2008 7:13 PM9 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.Entity Framework + Web + ADO.NET DataServicesMicrosoft TechDayshttp://www.techdays.ru 9/3/2008 7:13 PM 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

10ADO.NET Data ServicesC# 3.0VB 9.0.NET Language Integrated QueryLINQ toDataSetsLINQ toEntitiesLINQ toObjectsLINQ toXML

XMLLINQ toSQLMicrosoft SQL Server, Oracle, DB2, MySQLEntity FrameworkADO.NETREST APIClient LINQ Rest ProviderHTTPMicrosoft TechDayshttp://www.techdays.ru 9/3/2008 7:13 PM11 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Microsoft TechDays12 [email protected]://blogs.msdn.com/roman

Microsoft TechDayshttp://www.techdays.ru 9/3/2008 7:13 PM 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

13

14