{"id":1657,"date":"2013-06-20T00:00:00","date_gmt":"2013-06-20T00:00:00","guid":{"rendered":"https:\/\/test.simple-talk.com\/uncategorized\/different-approaches-of-entity-framework\/"},"modified":"2021-05-17T18:36:06","modified_gmt":"2021-05-17T18:36:06","slug":"different-approaches-of-entity-framework","status":"publish","type":"post","link":"https:\/\/www.red-gate.com\/simple-talk\/development\/dotnet-development\/different-approaches-of-entity-framework\/","title":{"rendered":"Different Approaches of Entity Framework"},"content":{"rendered":"<div class=\"article-content\">\n<p class=\"start\"> \tIn this article I will be describing the three approaches to using Entity Framework (EF) &#8211; Model First, Database First and Code First. <\/p>\n<p> \tI will illustrate how to use these techniques using Entity Framework 5.0, which has several performance improvements and new features which will be highlighted as part of the sample implementation. I will then go on to explain the relative advantages of each approach when designing the database. <\/p>\n<h2>Model First <\/h2>\n<p> \tIn the Model First approach, the database model is created first using the ORM designer in Visual Studio. Once the model consisting of entities and relationships has been designed, the physical database will be generated from the model. <\/p>\n<h3>Walk through &#8211; Creation of Model First<\/h3>\n<p> \tIn order to create the model, you should create an empty ASP.Net project in Visual Studio and add a new ADO.Net Entity Data Model, which for this example we&#8217;ll call ModelSample. <\/p>\n<p> \t<img decoding=\"async\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/imported\/1823-0464802d-37b6-4c60-bead-532facdfe9a7.png\" alt=\"1823-0464802d-37b6-4c60-bead-532facdfe9a\" \/><\/p>\n<p class=\"caption\"> \tFigure 1: Add ADO.Net Entity Data Model <\/p>\n<p> \tThis will open the Entity Data Model Wizard. Select the <em>Empty Model<\/em> from the <em>Model Contents<\/em> selection. <\/p>\n<p> \t<img decoding=\"async\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/imported\/1823-edde9c0c-5505-4b9c-8a88-f158dd3f1ca1.png\" alt=\"1823-edde9c0c-5505-4b9c-8a88-f158dd3f1ca\" \/><\/p>\n<p class=\"caption\"> \tFigure 2: Choose Model Contents <\/p>\n<p> \tThis loads the entity data model designer. Add Entities from the toolbox to our entity data model designer. Link the entities using the &#8216;<em>Association from<\/em><em>&#8216;<\/em> Toolbox to complete the model design. <img decoding=\"async\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/imported\/1823-67a883f0-a020-44bb-a1c4-070d02e4737d.png\" alt=\"1823-67a883f0-a020-44bb-a1c4-070d02e4737\" \/><\/p>\n<p class=\"caption\"> \tFigure 3: Sample designer with entities <\/p>\n<p> \t<u>New feature:<\/u>  Entity Color. As you can see in the above diagram, we can color the entities appropriately for better understanding and grouping. In our sample, <strong>leave<\/strong>-related entities are colored with orange, <strong>organization details<\/strong> in purple and the <strong>employee details<\/strong> in blue. <\/p>\n<p> \tOnce the entity model design is completed, generate the database from the model using the &#8216;<em>Generate <\/em><em>Database from Model<\/em>&#8216; context menu. Right-click on the designer to invoke the Context menu, then select the &#8216;<em>Generate Database from Model<\/em><em>&#8216;<\/em><em><\/em>option. <\/p>\n<p> \t<img decoding=\"async\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/imported\/1823-b906dac2-e9c9-49eb-bacf-929f4cbdf125.png\" alt=\"1823-b906dac2-e9c9-49eb-bacf-929f4cbdf12\" \/><\/p>\n<p class=\"caption\"> \tFigure 4:Generate Database from Model <\/p>\n<p> \tSelect an existing database connection or create a new connection to create the sample database from the Model. For this sample, I have used SQLExpress with the SampleDB database connection. <\/p>\n<p> \t<img decoding=\"async\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/imported\/1823-f0a97b95-e264-41d2-a2ad-ed85ab8e3b16.png\" alt=\"1823-f0a97b95-e264-41d2-a2ad-ed85ab8e3b1\" \/><\/p>\n<p class=\"caption\"> \tFigure 5: Choose Data Connection <\/p>\n<p> \tThis will generate the DDL statements, and the generated script will be added to the solution as a script file. <\/p>\n<p> \t<img decoding=\"async\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/imported\/1823-50b9810c-0263-49a4-af90-2dcdac53b1bf.png\" alt=\"1823-50b9810c-0263-49a4-af90-2dcdac53b1b\" \/><\/p>\n<p class=\"caption\"> \tFigure 6: Specify DDL file name <\/p>\n<p> \tThe script file generated in the previous step will be opened in Visual Studio. Click &#8216;<em>Execute<\/em><em>&#8216;<\/em><em><\/em>in order to create the database using the generated script. <\/p>\n<p> \t<img decoding=\"async\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/imported\/1823-36861ecb-f624-475c-a5e1-65724174280d.png\" alt=\"1823-36861ecb-f624-475c-a5e1-65724174280\" \/><\/p>\n<p class=\"caption\"> \tFigure 7: Execute Script <\/p>\n<p> \tNow, the database with all tables and relationships is created in the database server. For working with the new database, generate the code using the Code Generation Strategy; set this value as &#8220;default&#8221;. <\/p>\n<p> \t<img decoding=\"async\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/imported\/1823-74841862-b32b-468e-b1e2-9c73b624f108.png\" alt=\"1823-74841862-b32b-468e-b1e2-9c73b624f10\" \/><\/p>\n<p class=\"caption\"> \tFigure 8: code Generation Strategy <\/p>\n<p> \tThis will generate the entity framework code and database context classes corresponding to the defined model. We can use these new classes from the business layer to perform various database operations. Verify the code generated under the Modelname.Designer.cs file. <\/p>\n<p> \t<img decoding=\"async\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/imported\/1823-2c07a2c8-70da-4dd4-9272-72793e7fbdce.png\" alt=\"1823-2c07a2c8-70da-4dd4-9272-72793e7fbdc\" \/><\/p>\n<p class=\"caption\"> \tFigure 9: Designer Code <\/p>\n<p> \tWe can sync the Model with the database either way using the context menu options &#8211; &#8216;<em>Generate Database from Model<\/em>&#8216; or &#8216;<em>Update Model from Database<\/em>&#8216;. You can modify the model and then invoke the &#8216;<em>Generate database from Model<\/em><em>&#8216;<\/em> context menu option to update the database schema. Any modification in database schema can get updated to the model using the &#8216;<em>Update Model from Database<\/em>&#8216; context menu option. <\/p>\n<p> \t <u>New feature:<\/u>  Multiple-diagrams per single Model. <\/p>\n<p> \tAnother new feature introduced in EF 5.0 is to allow the use of multiple diagrams for a single model. We can move selected entities to another diagram in order to reduce the complexity of the main diagram. Select the entities by holding shift key and select the &#8220;<em>Move to new diagram<\/em>&#8221; option from the context menu. <\/p>\n<p> \t<img decoding=\"async\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/imported\/1823-3f5fec17-f1bf-421a-a9ab-b8fe2f0ee6c3.png\" alt=\"1823-3f5fec17-f1bf-421a-a9ab-b8fe2f0ee6c\" \/><\/p>\n<p class=\"caption\"> \tFigure 10: Move to new diagram <\/p>\n<p> \tLet us move the entities related to <strong>leave<\/strong> to another diagram. This will create a new diagram with selected entities; in our case <strong>Leave<\/strong> and <strong>Leavedetail.<\/strong> <\/p>\n<p> \t<img decoding=\"async\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/imported\/1823-3f876a07-e7d2-4f3d-a802-a18c92727fdd.png\" alt=\"1823-3f876a07-e7d2-4f3d-a802-a18c92727fd\" \/><\/p>\n<p class=\"caption\"> \tFigure 11: Multiple diagram for single Model <\/p>\n<p> \tAs you can see, the relationship between the <strong>LeaveDetail<\/strong> entity and the Employee entity has been removed. We can use the new ORM feature to include the related entities in the second diagram by keeping one copy of the same in the first diagram for better readability. We can include the related entities in the second diagram using &#8220;<em>Include Related<\/em>&#8221; option. This will create a copy of all the related entities in the second diagram. Select the <strong>Leavedetai<\/strong>l entity, right-click and select the option &#8220;<strong><em>Include Related<\/em><\/strong>&#8221; to include the employee entities in the second diagram. <\/p>\n<p> \t<img decoding=\"async\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/imported\/1823-49b3d727-222e-412b-8840-327ca2a4afac.png\" alt=\"1823-49b3d727-222e-412b-8840-327ca2a4afa\" \/><\/p>\n<p class=\"caption\"> \tFigure 12: Include Related <\/p>\n<p> \t<img decoding=\"async\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/imported\/1823-1d0fbbe4-647e-4a55-a218-04319d671110.png\" alt=\"1823-1d0fbbe4-647e-4a55-a218-04319d67111\" \/><\/p>\n<p class=\"caption\"> \tFigure 13: Multi-diagram with Include Related <\/p>\n<h2>Database First<\/h2>\n<p> \tThe next approach supported by the Entity Framework is the database-first approach. In the database first approach, we are creating the entity framework from an existing database. We use all other functionality, such as the model\/database sync and the code generation, in the same way we used them in the Model First approach. <\/p>\n<p> \tCreate the ADO.Net Entity Data model using the &#8216;<em>Generate from Databas<\/em><em>e&#8217;<\/em> option. <\/p>\n<p> \t<img decoding=\"async\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/imported\/1823-a4516dbd-2382-44f4-9730-52c8b5b23301.png\" alt=\"1823-a4516dbd-2382-44f4-9730-52c8b5b2330\" \/><\/p>\n<p class=\"caption\"> \tFigure 14: Choose Model Content <\/p>\n<p> \tSelect an existing connection or new connection from the &#8216;<em>choose data connection<\/em><em>&#8216;<\/em> window. We are using the<strong> sampleDB<\/strong> that we created as part of our Model First sample. Now, select the database objects suitable for your project such as Tables, Views and Stored procedures, functions from the &#8216;<em>Choose your D<\/em><em>atabase <\/em><em>O<\/em><em>bjects<\/em>&#8216; window. <\/p>\n<p> \t<img decoding=\"async\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/imported\/1823-3ca3c42d-af86-4e80-9f37-5dd177233c43.png\" alt=\"1823-3ca3c42d-af86-4e80-9f37-5dd177233c4\" \/><\/p>\n<p class=\"caption\">\tFigure 15: Choose database objects <\/p>\n<p> \tThis will generate the designer with selected entities and associations as shown below. <\/p>\n<p> \t<img decoding=\"async\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/imported\/1823-97659c32-d86a-4900-9429-daccea8fa687.png\" alt=\"1823-97659c32-d86a-4900-9429-daccea8fa68\" \/><\/p>\n<p class=\"caption\"> \tFigure 16: Entity data model designer <\/p>\n<p> \tCreate the code using the &#8216;<em>Code Generation Strategy<\/em><em>&#8216;<\/em> property, and perform the sync between the database and model in the same way that the Model-first approach works. Any sync back to the database will recreate the database and the existing data will be lost. <\/p>\n<p> \t<u>New feature:<\/u>  There is now support for Table-valued functions. Before using the <strong>SampleDB<\/strong> in the database-first approach, we have added a Table-valued function called <strong>UpdateLeave<\/strong> to the database. You&#8217;ll notice that the new Table-valued function is added under the Complex Type region inside the Designer.cs file. Support for the Table-valued function has been added as part of Entity Framework 5.0 and is available for the database-first approach only. <\/p>\n<p> \t<u>New feature:<\/u>  Enum properties. Support for <strong>enum<\/strong> properties are added as part of Entity Framework 5.0. Add one Integer property, say <strong>Relationship<\/strong> to the entity. Right-click on the property and select the &#8220;<em>Convert to Enum<\/em>&#8221; option from the context menu. <\/p>\n<p> \t<img decoding=\"async\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/imported\/1823-4e094ec4-c534-425e-a20e-52224b9226d1.png\" alt=\"1823-4e094ec4-c534-425e-a20e-52224b9226d\" \/><\/p>\n<p class=\"caption\"> \tFigure 17: Convert to Enum <\/p>\n<p> \tAdd the enumeration members and values in the &#8216;<em>Add Enum Type<\/em><em>&#8216;<\/em> window. <\/p>\n<p> \t<img decoding=\"async\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/imported\/1823-fe75a605-09ba-40b0-83e2-da2abb25f850.png\" alt=\"1823-fe75a605-09ba-40b0-83e2-da2abb25f85\" \/><\/p>\n<p class=\"caption\"> \tFigure 18: Add Enum Type <\/p>\n<p> \tInstead of adding each value, we can refer an external type using the &#8216;<em>Reference external type<\/em><em>&#8216;<\/em> option. <\/p>\n<p> \tHere is the generated code for the new Enum added inside the Designer.cs file <\/p>\n<pre class=\"lang:c# theme:vs2012\">[EdmEnumTypeAttribute(NamespaceName=\"SampleDBModel\", id=\"Relationship\"\")]\n   [DataContractAttribute()]\n   public enum Relationship : int\n   {\n      \/\/\/&lt;summary&gt;\n      \/\/\/No Metadata Documentation available.\n      \/\/\/&lt;\/summary&gt;\n      [EnumMemberAttribute()]\n      Mother=1,\n\t\n      \/\/\/&lt;summary&gt;\n      \/\/\/No Metadata Documentation available.\n      \/\/\/&lt;\/summary&gt;\n      [EnumMemberAttribute()]\n      Father=2,\n\t\n      \/\/\/&lt;summary&gt;\n      \/\/\/No Metadata Documentation available.\n      \/\/\/&lt;\/summary&gt;\n      [EnumMemberAttribute()]\n      Spouse=3,\n\t\n      \/\/\/&lt;summary&gt;\n      \/\/\/No Metadat aDocumentation available.\n      \/\/\/&lt;\/summary&gt;\n      [EnumMemberAttribute()]\n      Child=4\n   }<\/pre>\n<p> \t<u>New feature:<\/u> Support for Geography and Geometry types. Support for the DBGeography and DBGeometry types are added as part of Entity Framework 5.0. <\/p>\n<p> \t<img decoding=\"async\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/imported\/1823-39a8ac8c-b74e-4bc5-805c-3c2a9887258e.png\" alt=\"1823-39a8ac8c-b74e-4bc5-805c-3c2a9887258\" \/><\/p>\n<p class=\"caption\"> \tFigure 19: Geometry &amp; Geography supports <\/p>\n<h2>Code First<\/h2>\n<p> \tIn Code-First Approach, we create the classes first and then generate the database from the classes directly. In code first, we won&#8217;t use the Entity Designer (for editing .edmx files) at all. <\/p>\n<p> \tFirst, create the classes which represent the database table. For this walkthrough I am using the Category and Product classes. <\/p>\n<pre class=\"lang:c# theme:vs2012\">public class Category\n   {\n      public int CategoryId { get; set; }\n      public string Category { get; set; }\n      public string Description { get; set; }\n   }\n\n   public class Product\n   {\n      public int ProductId { get; set; }\n      public string ProductName { get; set; }\n      public float Price { get; set; }\n      public int CategoryId { get;set;}\n   }<\/pre>\n<p> \tNow, define the custom DbContext class derived from DbContext, which defines the classes that need to be converted to database tables. Here, we have defined both category and Product classes to represent as a table. <\/p>\n<pre class=\"lang:c# theme:vs2012\">public class SampleContext : DbContext\n   {\n      public DbSet&lt;Category&gt; Categories { get; set; }\n      public DbSet&lt;Product&gt; Products { get; set; }\n   }<\/pre>\n<p> \tFor performing the CRUD operations, define the data access class with proper methods. Here, we are defining only the SELECT operation, but we&#8217;ll need to define different methods for UPDATE, DELETE and SELECT options. <\/p>\n<pre class=\"lang:c# theme:vs2012\">public class SampleDataAccess\n   {\n      SampleContext  context = new SampleContext();\n      public List&lt;Product&gt; GetProducts()\n      {\n         return (from p in context.Products select p).ToList();\n      }\n   }<\/pre>\n<p> \tAdd the connection string to the web.config for accessing the database at run time. <\/p>\n<pre class=\"lang:xhtml theme:github\">&lt;add id=\"SampleContext\"\"\n   connectionString=\"datasource=.\\sqlexpress;IntegratedSecurity=SSPI;database=SampleDB\"\n   providerName=\"System.Data.SqlClient\"\/&gt;<\/pre>\n<p> \tBuild the solution before adding the UI control, GridView, to display the data from the database. Then, add a data source which will point to the <span class=\"codeteal\">SampleDataAccess<\/span> class. Select &#8216;<em>Object<\/em>&#8216; from the &#8216;<em>Choose a Data Source Type<\/em>&#8216; menu and specify an id for the data source. <\/p>\n<p> \t<img decoding=\"async\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/imported\/1823-bfe4be82-f457-4775-8757-ade353495c21.png\" alt=\"1823-bfe4be82-f457-4775-8757-ade353495c2\" \/><\/p>\n<p class=\"caption\"> \tFigure 20: Choose a Data source type <\/p>\n<p> \tSelect the <strong>SampleDataAccess<\/strong> class from the list. If it is not displayed here, then the solution may not be built properly. <\/p>\n<p> \t<img decoding=\"async\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/imported\/1823-672c04e1-668f-4793-8078-6d6847c6de72.png\" alt=\"1823-672c04e1-668f-4793-8078-6d6847c6de7\" \/><\/p>\n<p class=\"caption\"> \tFigure 21: Choose business object <\/p>\n<p> \tSet the methods for the CRUD operation. We have only one method selected called <strong>GetProducts()<\/strong>. <\/p>\n<p> \t<img decoding=\"async\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/imported\/1823-8641832a-3da7-4bb6-b47d-24dd2678ebbe.png\" alt=\"1823-8641832a-3da7-4bb6-b47d-24dd2678ebb\" \/><\/p>\n<p class=\"caption\"> \tFigure 22: Define data methods <\/p>\n<p> \tWe can define the Update, Delete and Insert methods in the same way. Here are the tables available under the<strong> SampleDB<\/strong> database before running the application. <\/p>\n<p> \t<img decoding=\"async\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/imported\/1823-221320d7-3356-4b8f-a3db-5665046e582f.png\" alt=\"1823-221320d7-3356-4b8f-a3db-5665046e582\" \/><\/p>\n<p class=\"caption\"> \tFigure 23: SampleDB before running app <\/p>\n<p> \tNow, run the application, which will display a blank page. You&#8217;ll see that the new Categories and Products tables are added in the SampleDB database after running the application. <\/p>\n<p> \t<img decoding=\"async\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/imported\/1823-81b5a661-bdae-4372-978e-da1ef195a3b3.png\" alt=\"1823-81b5a661-bdae-4372-978e-da1ef195a3b\" \/><\/p>\n<p class=\"caption\"> \tFigure 24: SampleDB after running the app <\/p>\n<p> \tTo try this out, we&#8217;ll insert few records to the database and run the application again. <\/p>\n<p> \t<img decoding=\"async\" src=\"https:\/\/www.red-gate.com\/simple-talk\/wp-content\/uploads\/imported\/1823-09d6ae1f-0cca-45c7-aa82-6c0250c26c00.png\" alt=\"1823-09d6ae1f-0cca-45c7-aa82-6c0250c26c0\" \/><\/p>\n<p class=\"caption\"> \tFigure 25: Code First output <\/p>\n<h2>Comparing the Model First, Database First and Code First approaches<\/h2>\n<p> \tSo when should one choose one method over the others? Here is a simple comparison of the advantages all three approaches. <\/p>\n<h3>Model First: <\/h3>\n<ul>\n<li>Good support with EDMX designer<\/li>\n<li>We can visually create the database model<\/li>\n<li>EF generates the Code and database script<\/li>\n<li>Extensible through partial classes<\/li>\n<li>We can modify the model and update the generated database.<\/li>\n<\/ul>\n<h3>Database First:<\/h3>\n<ul>\n<li>An existing database can be used<\/li>\n<li>Code can be auto-generated.<\/li>\n<li>Extensible using partial classes\/ T4 templates<\/li>\n<li>The developer can update the database manually<\/li>\n<li>There is a very good designer, which sync with the underlining database <\/li>\n<\/ul>\n<h3>Code First:<\/h3>\n<ul>\n<li>There is full control of the model from the Code; no EDMX\/designer<\/li>\n<li>No manual intervention to DB is required<\/li>\n<li>The database is used for data only<\/li>\n<\/ul>\n<p> \tThe Model First approach is preferable when creating the model using the ORM designer. Powerful features of the ORM designer help in creating a model very easily. The clear representation of the model in visual form is more understandable to all stakeholders involved in product development. <\/p>\n<p>If we have an existing database, like in the case of a maintenance project, we can use the Database First approach to create the Entity Framework objects out of the existing database. Any modification to the Model using the ORM designer requires syncing back to the database. Remember any changes to the model result in the deletion of the entire database so it can be re-created &#8211; all existing data will be lost.  <\/p>\n<p> \tHardcode coders love to code the model using the Code First approach. In this approach, the database is used for storing the data only. The database structure is defined by various classes. One of the advantages of the Code First approach is the same class is used for defining the database table structure and business object. Any changes in the class affect both the business object and the database table. Also, if we have any plans to deploy the project into Azure with Azure Storage, we can reuse the classes to define the Azure Storage objects. <\/p>\n<h1>Conclusion<\/h1>\n<p> \tEntity Framework provides three different approaches to deal with the model and each one has its own pros and cons. Entity Framework still has its share of issues and is not widely accepted yet. We can make the Entity Framework better by contributing to the development of the next version. You can contribute to the development of new features and bug fixes of the next version of Entity Framework at &#8220;<a href=\"http:\/\/entityframework.codeplex.com\/\">http:\/\/entityframework.codeplex.com\/<\/a>&#8220;. Innovative contributions to the next version of Entity Framework will make it more stable and widely adoptable. <\/p>\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Entity Framework provides three different approaches to deal with the model, and each one has its own pros and cons.  Ambily Kavumkal Kamalasanan discusses the advantages of the Model, Database, and Code First approaches to modeling in Entity Framework 5.0. Entity Framework still has its share of issues and is not widely accepted yet &#8211; but through contributing to its ongoing development the community can make it more stable and increase its adoption.&hellip;<\/p>\n","protected":false},"author":8305,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[143538],"tags":[4143,4229,4178,4168,5359,5870],"coauthors":[],"class_list":["post-1657","post","type-post","status-publish","format-standard","hentry","category-dotnet-development","tag-net","tag-net-framework","tag-bi","tag-database","tag-entity-framework","tag-modelling"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/1657","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/users\/8305"}],"replies":[{"embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/comments?post=1657"}],"version-history":[{"count":5,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/1657\/revisions"}],"predecessor-version":[{"id":91095,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/1657\/revisions\/91095"}],"wp:attachment":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/media?parent=1657"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/categories?post=1657"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/tags?post=1657"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/coauthors?post=1657"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}