{"id":745,"date":"2010-09-01T15:14:35","date_gmt":"2010-09-01T14:14:35","guid":{"rendered":"http:\/\/blog.eweibel.net\/?p=745"},"modified":"2010-09-02T09:12:01","modified_gmt":"2010-09-02T08:12:01","slug":"conform-another-nhibernate-mapping-possibility","status":"publish","type":"post","link":"https:\/\/blog.eweibel.net\/?p=745","title":{"rendered":"ConfORM &ndash; Another NHibernate mapping possibility"},"content":{"rendered":"<p>I recently hold two presentations at the <a href=\"http:\/\/www.dnug-bern.ch\" target=\"_blank\">.Net User Group Bern<\/a> (<a href=\"http:\/\/twitter.com\/dnugbe\" target=\"_blank\">DNUG<\/a>) with <a href=\"http:\/\/www.databinding.net\/\" target=\"_blank\">Ren\u00e9 Leupold<\/a> about object relational mapping in the .Net world. We showed Entity Framework 4.0 and <a href=\"http:\/\/nhforge.org\/\" target=\"_blank\">NHibernate<\/a>. My part was NHibernate. You could download the slides and samples from the <a href=\"http:\/\/www.dnug-bern.ch\/presentations.aspx\" target=\"_blank\">DNUG website<\/a>.<\/p>\n<p>In the two presentations I showed the mapping possibilities with hbm.xml files, <a href=\"http:\/\/sourceforge.net\/projects\/nhcontrib\/files\/\" target=\"_blank\">attributes<\/a> and <a href=\"http:\/\/fluentnhibernate.org\/\" target=\"_blank\">Fluent NHibernate<\/a>. In a <a href=\"http:\/\/blog.eweibel.net\/?p=377\" target=\"_blank\">previous blog post<\/a> I already showed those possibilities.<a href=\"http:\/\/blog.eweibel.net\/wp-content\/uploads\/ConfOrmBigTransparent.png\"><img loading=\"lazy\" decoding=\"async\" style=\"border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px\" title=\"ConfOrmBigTransparent\" border=\"0\" alt=\"ConfOrmBigTransparent\" align=\"right\" src=\"http:\/\/blog.eweibel.net\/wp-content\/uploads\/ConfOrmBigTransparent_thumb.png\" width=\"159\" height=\"159\" \/><\/a> <\/p>\n<p>During the preparations I hadn\u2019t time to try a new way to map your entities to the database. This new way is offered by the framework <a href=\"http:\/\/fabiomaulo.blogspot.com\/2010\/02\/conform-nhibernate-un-mapping.html\" target=\"_blank\">ConfORM<\/a>, created by one of the contributors of NHibernate Fabio Maulo.<\/p>\n<p>In a previous post I showed the other possibilities how you can map your entities. In this post I show you the most simplest way I found to map the entities with ConfORM. I used for this example the version 1.0.2 (Alpha 2) of ConfORM and the version <a href=\"http:\/\/sourceforge.net\/projects\/nhibernate\/files\/\" target=\"_blank\">3.0.0 Alpha 2 of NHibernate<\/a>. The current version of ConfORM is available <a href=\"http:\/\/code.google.com\/p\/codeconform\/\" target=\"_blank\">here<\/a>.<\/p>\n<p><strong>Domain<\/strong><\/p>\n<p>The domain for this sample is quite simple. It is a one to many mapping between Order and its OrderItems. The associations is bidirectional. Below you see the class diagram of the two classes:<\/p>\n<p><a href=\"http:\/\/blog.eweibel.net\/wp-content\/uploads\/ClassDiagram.png\"><img loading=\"lazy\" decoding=\"async\" style=\"border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px\" title=\"ClassDiagram\" border=\"0\" alt=\"ClassDiagram\" src=\"http:\/\/blog.eweibel.net\/wp-content\/uploads\/ClassDiagram_thumb.png\" width=\"452\" height=\"260\" \/><\/a> <\/p>\n<p><strong>Database<\/strong><\/p>\n<p>The following ERD show the two tables Order and OrderItem in the database. Between the two tables exists a foreign key constraint. None of the fields are nullable.<\/p>\n<p><a href=\"http:\/\/blog.eweibel.net\/wp-content\/uploads\/database.png\"><img loading=\"lazy\" decoding=\"async\" style=\"border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px\" title=\"database\" border=\"0\" alt=\"database\" src=\"http:\/\/blog.eweibel.net\/wp-content\/uploads\/database_thumb.png\" width=\"457\" height=\"156\" \/><\/a> <\/p>\n<p><strong>Configuration<\/strong><\/p>\n<p>First, we need to declare the connection string, so that we could connect to the database. I could do it in the code, but even for a such simple example it is too dirty for me. So I added an application configuration file (app.config) and added following lines:<\/p>\n<div style=\"padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px\" id=\"scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:6d45648b-f95a-4d1b-a38f-f48cac647819\" class=\"wlWriterEditableSmartContent\">\n<pre class=\"brush: xml\">&lt;?xml version=\"1.0\" encoding=\"utf-8\" ?&gt;\r\n&lt;configuration&gt;\r\n\t&lt;connectionStrings&gt;\r\n\t\t&lt;add name=\"default\" connectionString=\"Server=localhost;database=ORMSamples;Integrated Security=SSPI;\"\/&gt;\r\n\t&lt;\/connectionStrings&gt;\r\n&lt;\/configuration&gt;<\/pre>\n<\/div>\n<p>Now I have a connectionstring named \u201cdefault\u201d which points to my local database ORMSamples.<\/p>\n<p>When you are familiar with NHibernate, you know that you have to have a place where your session factory lives and will be created. For this purpose I normally create a class called PersistenceManager. The field factory, the property Factory and the method OpenSession are the code I would create also when I map my entities with hbm.xml files or with Fluent NHibernate or with attributes.<\/p>\n<p>Where it starts to be different is the CreateConfiguration method. In this method I could create the configuration part by code. This fluent API to create a configuration is called <a href=\"http:\/\/www.mcdev.za.net\/2010\/08\/minimalist-nhibernate-3-loquacious-configuration\/\" target=\"_blank\">Loquacious<\/a>. Normally I would declare all this stuff in the application configuration file.<\/p>\n<p>I think for a such simple application it is OK to do it like that, but I prefer the way over the application configuration file. The reason for that is, that I could configure my application for each scenario (depends on database product, etc.).<\/p>\n<div style=\"padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px\" id=\"scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:3d58f974-3e32-4a6b-a1de-2e0699109dc9\" class=\"wlWriterEditableSmartContent\">\n<pre class=\"brush: c#\">namespace ORMSamples.ConfORM.Utils\r\n{\r\n\tpublic class PersistenceManager\r\n\t{\r\n\t\tprivate static ISessionFactory factory;\r\n\r\n\t\tprivate static ISessionFactory Factory\r\n\t\t{\r\n\t\t\tget\r\n\t\t\t{\r\n\t\t\t\tif(factory == null)\r\n\t\t\t\t{\r\n\t\t\t\t\tConfiguration config = CreateConfiguration();\r\n\t\t\t\t\tfactory = config.BuildSessionFactory();\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn factory;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tpublic static ISession OpenSession()\r\n\t\t{\r\n\t\t\treturn Factory.OpenSession();\r\n\t\t}\r\n\r\n\t\tprivate static Configuration CreateConfiguration()\r\n\t\t{\r\n\t\t\tvar configure = new Configuration();\r\n\t\t\tconfigure.SessionFactoryName(\"Demo\");\r\n\r\n\t\t\tconfigure.Proxy(p =&gt; p.ProxyFactoryFactory&lt;ProxyFactoryFactory&gt;());\r\n\t\t\tconfigure.DataBaseIntegration(db =&gt;\r\n\t\t\t{\r\n\t\t\t\tdb.Dialect&lt;MsSql2008Dialect&gt;();\r\n\t\t\t\tdb.Driver&lt;SqlClientDriver&gt;();\r\n\t\t\t\tdb.KeywordsAutoImport = Hbm2DDLKeyWords.AutoQuote;\r\n\t\t\t\tdb.ConnectionString = ConfigurationManager.ConnectionStrings[\"default\"].ConnectionString;\r\n\t\t\t\tdb.LogSqlInConsole = true;\r\n\t\t\t\tdb.HqlToSqlSubstitutions = \"true 1, false 0, yes 'Y', no 'N'\";\r\n\t\t\t});\r\n\r\n\t\t\tconfigure.AddDeserializedMapping(GetMapping(), \"ORMSamples_ConfORM\");\r\n\r\n\t\t\treturn configure;\r\n\t\t}\r\n\r\n\t\tprivate static HbmMapping GetMapping()\r\n\t\t{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}\r\n}\r\n<\/pre>\n<\/div>\n<p>Yet I didn\u2019t map one entity but there is an empty method GetMapping. In this method we will program our mapping in the next section.<\/p>\n<p><strong>Mapping<\/strong><\/p>\n<p>Below you see the completed class PersistenceManager. The implementation was created based on the example in the source code of ConfORM. The main method here is the GetMapping method. It implements a <a href=\"http:\/\/en.wikipedia.org\/wiki\/Template_method_pattern\" target=\"_blank\">template method pattern<\/a> to create the mapping.<\/p>\n<p>Very important for the mapping is the method DomainDefinition. There you define your domain what means you declare all root entities. In our case it means that we have to add Order and OrderItem as root entities. For this purpose you have to call TablePerClass on the instance of the ObjectRelationalMapper class for each entity (or call it once for a collection of entities).<\/p>\n<p>The patterns in ConfORM I will leave here out and come directly to the Customize method. In this method I implemented again a template method pattern. In the method CustomizeRelations I define all specialties of my entities, in the method CustomizeTables I define the DB-Schemas and finally in the method CustomizeColumns I define that the properties are all not nullable.<\/p>\n<div style=\"padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px\" id=\"scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:f4244f3c-c481-4139-a338-fc17a0c1ed30\" class=\"wlWriterEditableSmartContent\">\n<pre class=\"brush: c#\">namespace ORMSamples.ConfORM.Utils\r\n{\r\n\tpublic class PersistenceManager\r\n\t{\r\n\t\tprivate static ISessionFactory factory;\r\n\r\n\t\tprivate static ISessionFactory Factory {...}\r\n\r\n\t\tpublic static ISession OpenSession() {...}\r\n\r\n\t\tprivate static Configuration CreateConfiguration() {...}\r\n\t\t\r\n\t\tprivate static HbmMapping GetMapping()\r\n\t\t{\r\n\t\t\tObjectRelationalMapper orm = new ObjectRelationalMapper();\r\n\t\t\torm.Patterns.PoidStrategies.Add(new NativePoidPattern());\r\n\t\t\tMapper mapper = new Mapper(orm);\r\n\t\t\t\r\n\t\t\tvar entities = new List&lt;Type&gt;();\r\n\r\n\t\t\tDomainDefinition(orm);\r\n\t\t\tRegisterPatterns(mapper, orm);\r\n\t\t\tCustomize(mapper);\r\n\r\n\t\t\tentities.AddRange(GetEntities());\r\n\r\n\t\t\treturn mapper.CompileMappingFor(entities);\r\n\t\t}\r\n\r\n\t\tprivate static void DomainDefinition(ObjectRelationalMapper orm)\r\n\t\t{\r\n\t\t\torm.TablePerClass(GetEntities());\r\n\t\t}\r\n\r\n\t\tprivate static void RegisterPatterns(Mapper mapper, IDomainInspector domainInspector)\r\n\t\t{\r\n\t\t}\r\n\r\n\t\tprivate static void Customize(Mapper mapper)\r\n\t\t{\r\n\t\t\tCustomizeRelations(mapper);\r\n\t\t\tCustomizeTables(mapper);\r\n\t\t\tCustomizeColumns(mapper);\r\n\t\t}\r\n\r\n\t\tprivate static void CustomizeRelations(Mapper mapper)\r\n\t\t{\r\n\t\t\tmapper.Class&lt;Order&gt;(cm =&gt;\r\n\t\t\t{\r\n\t\t\t\tcm.Id(o =&gt; o.Id, im =&gt; im.Generator(Generators.Identity));\r\n\t\t\t\tcm.Bag(\r\n\t\t\t\t\to =&gt; o.Items,\r\n\t\t\t\t\tx =&gt;\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tx.Key(k =&gt; k.Column(\"OrderId\"));\r\n\t\t\t\t\t\t\tx.Lazy(CollectionLazy.NoLazy);\r\n\t\t\t\t\t\t}, \r\n\t\t\t\t\tx =&gt; { });\r\n\t\t\t});\r\n\t\t\tmapper.Class&lt;OrderItem&gt;(cm =&gt;\r\n\t\t\t{\r\n\t\t\t\tcm.Id(o =&gt; o.Id, im =&gt; im.Generator(Generators.Identity));\r\n\t\t\t\tcm.ManyToOne(\r\n\t\t\t\t\tx =&gt; x.Order,\r\n\t\t\t\t\tm =&gt;\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tm.Column(\"OrderId\");\r\n\t\t\t\t\t\t\tm.Fetch(FetchMode.Join);\r\n\t\t\t\t\t\t\tm.NotNullable(true);\r\n\t\t\t\t\t\t});\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tprivate static void CustomizeTables(Mapper mapper)\r\n\t\t{\r\n\t\t\tmapper.Class&lt;Order&gt;(cm =&gt; cm.Schema(\"OneToMany\"));\r\n\t\t\tmapper.Class&lt;OrderItem&gt;(cm =&gt; cm.Schema(\"OneToMany\"));\r\n\t\t}\r\n\r\n\t\tprivate static void CustomizeColumns(Mapper mapper)\r\n\t\t{\r\n\t\t\tmapper.Class&lt;Order&gt;(\r\n\t\t\t\tcm =&gt;\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tcm.Property(x =&gt; x.OrderNumber, m =&gt; m.NotNullable(true));\r\n\t\t\t\t\t\tcm.Property(x =&gt; x.CompanyName, m =&gt; m.NotNullable(true));\r\n\t\t\t\t\t\tcm.Property(x =&gt; x.Street, m =&gt; m.NotNullable(true));\r\n\t\t\t\t\t\tcm.Property(x =&gt; x.PostalCode, m =&gt; m.NotNullable(true));\r\n\t\t\t\t\t\tcm.Property(x =&gt; x.City, m =&gt; m.NotNullable(true));\r\n\t\t\t\t\t});\r\n\t\t\tmapper.Class&lt;OrderItem&gt;(\r\n\t\t\t\tcm =&gt;\r\n\t\t\t\t{\r\n\t\t\t\t\tcm.Property(x =&gt; x.Quantity, m =&gt; m.NotNullable(true));\r\n\t\t\t\t\tcm.Property(x =&gt; x.ProductId, m =&gt; m.NotNullable(true));\r\n\t\t\t\t});\r\n\t\t}\r\n\r\n\t\tprivate static IEnumerable&lt;Type&gt; GetEntities()\r\n\t\t{\r\n\t\t\treturn typeof(Order).Assembly.GetTypes().Where(t =&gt; t.Namespace == typeof(Order).Namespace);\r\n\t\t}\r\n\t}\r\n}\r\n<\/pre>\n<\/div>\n<p><strong><\/strong><\/p>\n<p><strong>How to test it<\/strong><\/p>\n<p>Normally I would start with the test first, but this post is about ConfORM and not about TDD or the test first approach. To test our simple example is quite easy: You could create some <a href=\"http:\/\/en.wikipedia.org\/wiki\/Create,_read,_update_and_delete\" target=\"_blank\">CRUD<\/a>-Tests. To not clutter this blog post I publish here just a Create-Test. As you can see, it\u2019s normal NHibernate code and the whole mapping is encapsulated in the PersistenceManager class.<\/p>\n<div style=\"padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px\" id=\"scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:2561079a-0254-4a02-b431-8767efbcd758\" class=\"wlWriterEditableSmartContent\">\n<pre class=\"brush: c#\">namespace ORMSamples.ConfORM.Test.OneToMany\r\n{\r\n\t[TestFixture]\r\n\tpublic class OneToManyCRUDTest\r\n\t{\r\n\t\tprivate Order order;\r\n\t\tprivate OrderItem orderitem;\r\n\r\n\t\t[SetUp]\r\n\t\tpublic void SetUp()\r\n\t\t{\r\n\t\t\torder = new Order();\r\n\t\t\torderitem = new OrderItem();\r\n\t\t}\r\n\r\n\t\t[TearDown]\r\n\t\tpublic void TearDown()\r\n\t\t{\r\n\t\t\tusing(ISession session = PersistenceManager.OpenSession())\r\n\t\t\tusing(ITransaction tx = session.BeginTransaction())\r\n\t\t\t{\r\n\t\t\t\tsession.Delete(order);\r\n\t\t\t\ttx.Commit();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t[Test]\r\n\t\tpublic void TestCreate()\r\n\t\t{\r\n\t\t\t\/\/ Arrange\r\n\t\t\torder.OrderNumber = \"12345\";\r\n\t\t\torder.CompanyName = \"Test Company\";\r\n\t\t\torder.Street = \"Hauptstrasse 1\";\r\n\t\t\torder.PostalCode = \"1234\";\r\n\t\t\torder.City = \"Z\u00fcrich\";\r\n\t\t\torderitem.Order = order;\r\n\t\t\torder.Items.Add(orderitem);\r\n\t\t\torderitem.ProductId = 234;\r\n\t\t\torderitem.Quantity = 1;\r\n\r\n\t\t\t\/\/ Act\r\n\t\t\tusing(ISession session = PersistenceManager.OpenSession())\r\n\t\t\tusing(ITransaction tx = session.BeginTransaction())\r\n\t\t\t{\r\n\t\t\t\tsession.Save(order);\r\n\t\t\t\ttx.Commit();\r\n\t\t\t}\r\n\r\n\t\t\t\/\/ Assert\r\n\t\t\tAssert.AreNotEqual(0, order.Id);\r\n\t\t\tAssert.AreNotEqual(0, orderitem.Id);\r\n\t\t}\r\n\t}\r\n}<\/pre>\n<\/div>\n<p><strong>Conclusion<\/strong><\/p>\n<p>The first impression of ConfORM was that it seemed to me more complicated than Fluent NHibernate. But after a while I was able to work with. I\u2019m sure, that I didn\u2019t understand all implemented ideas, but the framework still in alpha so I have time to learn them.<\/p>\n<p>ConfORM doesn\u2019t say you how to manage the code where you specify your mappings like Fluent NHibernate. So, you have to be cautious not to code all your mappings in one class (as I did with the PersistenceManager). In this point I find the more stricter way of Fluent NHibernate a bit better.<\/p>\n<p>The owner and contributor of ConfORM, Fabio Maulo, has react very fast as I asked him to implement the missing fetch attribute for collections. If you have questions about ConfORM, you can ask him directly via <a href=\"http:\/\/twitter.com\/fabiomaulo\" target=\"_blank\">twitter<\/a> or the community via the <a href=\"http:\/\/groups.google.ch\/group\/codeconform\" target=\"_blank\">Google user group<\/a>. ConfORM is definitively an interesting alternative for mapping entities in a fluent way.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I recently hold two presentations at the .Net User Group Bern (DNUG) with Ren\u00e9 Leupold about object relational mapping in the .Net world. We showed Entity Framework 4.0 and NHibernate. My part was NHibernate. You could download the slides and samples from the DNUG website. In the two presentations I showed the mapping possibilities with hbm.xml files, attributes and Fluent NHibernate. In a previous blog post I already showed those possibilities. During the preparations I hadn\u2019t time to try a&#8230;<\/p>\n<p class=\"read-more\"><a class=\"btn btn-default\" href=\"https:\/\/blog.eweibel.net\/?p=745\"> Read More<span class=\"screen-reader-text\">  Read More<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[13,7,14],"tags":[],"class_list":["post-745","post","type-post","status-publish","format-standard","hentry","category-net","category-first-experiencies","category-software-engineering"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/plOV9-c1","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":761,"url":"https:\/\/blog.eweibel.net\/?p=761","url_meta":{"origin":745,"position":0},"title":"NHibernate presentations at DNUG Bern","author":"Patrick","date":"2. Sep 2010","format":false,"excerpt":"I hold in August two presentations at the .Net User Group Bern together with Ren\u00e9 Leupold.\u00a0 In both presentations the topic was object relational mapping in the .Net world. So we showed Microsoft Entity Framework 4.0 and NHibernate. My part was NHibernate and Rene showed EF. In the first presentation\u2026","rel":"","context":"In &quot;.NET&quot;","block_context":{"text":".NET","link":"https:\/\/blog.eweibel.net\/?cat=13"},"img":{"alt_text":"dnugbe","src":"https:\/\/i0.wp.com\/blog.eweibel.net\/wp-content\/uploads\/dnugbe_thumb.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":377,"url":"https:\/\/blog.eweibel.net\/?p=377","url_meta":{"origin":745,"position":1},"title":"NHibernate mapping possibilities","author":"Patrick","date":"24. Aug 2009","format":false,"excerpt":"I prepare currently a new talk about NHibernate. In this talk I'll show the different mapping possibilities with NHibernate. To demonstrate the three possibilities (and a fourth one) I chose a quite simple model: I implement three classes Cat, Dog and Bird an for each one I chose a different\u2026","rel":"","context":"In &quot;.NET&quot;","block_context":{"text":".NET","link":"https:\/\/blog.eweibel.net\/?cat=13"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":797,"url":"https:\/\/blog.eweibel.net\/?p=797","url_meta":{"origin":745,"position":2},"title":"NHibernate day in Bologna","author":"Patrick","date":"25. Oct 2010","format":false,"excerpt":"During a whole day several speakers spoke about NHibernate and related topics. This conference was in Bologna and was very well prepared and organized. You could watch the slides and the videos of the sessions here. I joined the following sessions: Keynote Simone Chiaretta opened the conference and showed during\u2026","rel":"","context":"In &quot;.NET&quot;","block_context":{"text":".NET","link":"https:\/\/blog.eweibel.net\/?cat=13"},"img":{"alt_text":"NHDay_3","src":"https:\/\/i0.wp.com\/blog.eweibel.net\/wp-content\/uploads\/NHDay_3_thumb.png?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":160,"url":"https:\/\/blog.eweibel.net\/?p=160","url_meta":{"origin":745,"position":3},"title":"When to use stored procedures","author":"Patrick","date":"13. May 2009","format":false,"excerpt":"Recently I discussed with a colleague when to use stored procedures. As exptected it was quite a religious conversation. A few days later I found the following screencast: The Pros and Cons of Stored Procedures Based on the discussion and the screencast I tried to summarize my Pros and Cons:\u2026","rel":"","context":"In &quot;Good practices&quot;","block_context":{"text":"Good practices","link":"https:\/\/blog.eweibel.net\/?cat=5"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1264,"url":"https:\/\/blog.eweibel.net\/?p=1264","url_meta":{"origin":745,"position":4},"title":"Migrate a VSS repository to TFS","author":"Patrick","date":"2. Aug 2012","format":false,"excerpt":"Recently I had to migrate parts from a Microsoft Visual SourceSafe 2005 repository to a Microsoft Team Foundation Server 2010 repository. In this blog post I show what I had to do and what the pitfalls were. The tool To migrate a repository you have at least two possibilities: Migrate\u2026","rel":"","context":"In &quot;.NET&quot;","block_context":{"text":".NET","link":"https:\/\/blog.eweibel.net\/?cat=13"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":143,"url":"https:\/\/blog.eweibel.net\/?p=143","url_meta":{"origin":745,"position":5},"title":"My ASP.NET MVC presentation at work","author":"Patrick","date":"12. May 2009","format":false,"excerpt":"Yesterday I gave my ASP.NET MVC presentation at an internal techtalk event (which I organized). At this event two colleges presented also jQuery and PowerShell, which were very interesting presentations. You could download my presentation (in german) with the sample application (the idea of a contactmanager is from the official\u2026","rel":"","context":"In &quot;.NET&quot;","block_context":{"text":".NET","link":"https:\/\/blog.eweibel.net\/?cat=13"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/blog.eweibel.net\/index.php?rest_route=\/wp\/v2\/posts\/745","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.eweibel.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.eweibel.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.eweibel.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.eweibel.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=745"}],"version-history":[{"count":12,"href":"https:\/\/blog.eweibel.net\/index.php?rest_route=\/wp\/v2\/posts\/745\/revisions"}],"predecessor-version":[{"id":762,"href":"https:\/\/blog.eweibel.net\/index.php?rest_route=\/wp\/v2\/posts\/745\/revisions\/762"}],"wp:attachment":[{"href":"https:\/\/blog.eweibel.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=745"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.eweibel.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=745"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.eweibel.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=745"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}