{"id":1534,"date":"2013-12-06T11:17:54","date_gmt":"2013-12-06T11:17:54","guid":{"rendered":"http:\/\/kb.esds.co.in\/?p=1534"},"modified":"2017-11-30T06:22:24","modified_gmt":"2017-11-30T06:22:24","slug":"create-crud-in-dotnet-using-dynamic-data-entity-framework","status":"publish","type":"post","link":"https:\/\/www.esds.co.in\/kb\/create-crud-in-dotnet-using-dynamic-data-entity-framework\/","title":{"rendered":"Create CRUD in dotnet using dynamic data entity framework"},"content":{"rendered":"<p><strong>Introduction:<\/strong><\/p>\n<p>To develop website without coding. Create, update, read, delete screen for each table with parent child relation. Dynamic data driven from database for basic data operations.<\/p>\n<p><strong>Overview:<\/strong><\/p>\n<p>This website helps to cross check the table\u2019s relation by actually inserting and manipulating relevant data using input screens. Cross check data flows as expected or not, when it comes to prototype developer can rely on the database structure\/schema.<\/p>\n<p><strong>Objective:<\/strong><\/p>\n<p>Allow developer to examine database structure reliability and take prior measures before using the database in developing website. Validate user input on basis of data type used in backend.<\/p>\n<p><strong>Steps to be followed:<\/strong><\/p>\n<p><strong>1.<\/strong> Start Visual studio 2010, click on New Website under File tab template window will open.<br \/>\n<strong>2.<\/strong> Select C# &amp; Asp.net dynamic data entities web site under templates.<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter size-full wp-image-1535\" src=\"https:\/\/www.esds.co.in\/kb\/wp-content\/uploads\/2013\/12\/1.png\" alt=\"1\" width=\"675\" height=\"343\" \/><br \/>\n<strong>3.<\/strong> Name the application and select web location where site is to be saved and click ok.<br \/>\n<strong>4.<\/strong> Once application is created right click on website in solution explorer and click Add New Item.<br \/>\n<strong>5.<\/strong> Select ADO.NET Entity Data Model click Add.<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter size-full wp-image-1536\" src=\"https:\/\/www.esds.co.in\/kb\/wp-content\/uploads\/2013\/12\/2.png\" alt=\"2\" width=\"675\" height=\"318\" \/><\/p>\n<p><strong>6.<\/strong> Entity Data model wizard will open select \u201cGenerate from Database\u201d and click next.<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter size-full wp-image-1537\" src=\"https:\/\/www.esds.co.in\/kb\/wp-content\/uploads\/2013\/12\/3.png\" alt=\"3\" width=\"675\" height=\"424\" \/><\/p>\n<p><strong>7.<\/strong> Click on \u201cNew Connection&#8230;\u201d Select server name, provide connection credentials and select database name.<br \/>\n<strong>8.<\/strong> Here I am using Employees database with 3 tables to track employee leaves.<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter size-full wp-image-1538\" src=\"https:\/\/www.esds.co.in\/kb\/wp-content\/uploads\/2013\/12\/4.png\" alt=\"4\" width=\"675\" height=\"314\" \/><br \/>\n<strong>9.<\/strong> Click on Test connection to make sure connection is successful.<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter size-full wp-image-1539\" src=\"https:\/\/www.esds.co.in\/kb\/wp-content\/uploads\/2013\/12\/5.png\" alt=\"5\" width=\"675\" height=\"501\" \/><\/p>\n<p><strong>10.<\/strong> Click ok and select radio option as \u201cYes, include the sensitive data in the connection string\u201d and click next.<br \/>\n<strong>11.<\/strong> Select Tables checkbox in the next step and finish.<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter size-full wp-image-1540\" src=\"https:\/\/www.esds.co.in\/kb\/wp-content\/uploads\/2013\/12\/6.png\" alt=\"6\" width=\"675\" height=\"601\" srcset=\"https:\/\/www.esds.co.in\/kb\/wp-content\/uploads\/2013\/12\/6.png 378w, https:\/\/www.esds.co.in\/kb\/wp-content\/uploads\/2013\/12\/6-300x267.png 300w\" sizes=\"(max-width: 675px) 100vw, 675px\" \/><br \/>\n<strong>12.<\/strong> Entity data model designer will be populated with table\u2019s structure and relation.<br \/>\n<strong>13.<\/strong> Now uncomment line number 26 below line within global.asax\u00a0 \/\/DefaultModel.RegisterContext(typeof(YourDataContextType), new ContextConfiguration() { ScaffoldAllTables = false });<br \/>\n<strong>14.<\/strong> Modify the line to DefaultModel.RegisterContext(typeof(employeesModel.employeesEntities), new ContextConfiguration() { ScaffoldAllTables = true });.<br \/>\n<strong>15.<\/strong> Good to build and run click F5 and default page shows link of all tables.<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter size-full wp-image-1541\" src=\"https:\/\/www.esds.co.in\/kb\/wp-content\/uploads\/2013\/12\/7.png\" alt=\"7\" width=\"675\" height=\"382\" srcset=\"https:\/\/www.esds.co.in\/kb\/wp-content\/uploads\/2013\/12\/7.png 475w, https:\/\/www.esds.co.in\/kb\/wp-content\/uploads\/2013\/12\/7-300x170.png 300w\" sizes=\"(max-width: 675px) 100vw, 675px\" \/><\/p>\n<p><strong>16.<\/strong> Create Page<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter size-full wp-image-1542\" src=\"https:\/\/www.esds.co.in\/kb\/wp-content\/uploads\/2013\/12\/8.png\" alt=\"8\" width=\"675\" height=\"382\" srcset=\"https:\/\/www.esds.co.in\/kb\/wp-content\/uploads\/2013\/12\/8.png 491w, https:\/\/www.esds.co.in\/kb\/wp-content\/uploads\/2013\/12\/8-300x170.png 300w\" sizes=\"(max-width: 675px) 100vw, 675px\" \/><br \/>\n<strong>17.<\/strong> List Page<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter size-full wp-image-1543\" src=\"https:\/\/www.esds.co.in\/kb\/wp-content\/uploads\/2013\/12\/9.png\" alt=\"9\" width=\"675\" height=\"381\" \/><br \/>\n<strong>18.<\/strong> Edit\/Update Page<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter size-full wp-image-1544\" src=\"https:\/\/www.esds.co.in\/kb\/wp-content\/uploads\/2013\/12\/10.png\" alt=\"10\" width=\"675\" height=\"295\" \/><\/p>\n<p><strong>19.<\/strong> Thus we can check each table and its relation with other table and conclude if data is in relational.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction: To develop website without coding. Create, update, read, delete screen for each table with parent child relation. Dynamic data driven from database for basic data operations. Overview: This website helps to cross check the table\u2019s relation by actually inserting and manipulating relevant data using input screens. Cross check data flows as expected or not,&#8230; <\/p>\n<div class=\"clear\"><\/div>\n<p><a href=\"https:\/\/www.esds.co.in\/kb\/create-crud-in-dotnet-using-dynamic-data-entity-framework\/\" class=\"gdlr-button small excerpt-read-more\">Read More<\/a><\/p>\n","protected":false},"author":12,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[69],"tags":[604,605],"aioseo_notices":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v15.9.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Create CRUD in dotnet using dynamic data entity framework<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.esds.co.in\/kb\/create-crud-in-dotnet-using-dynamic-data-entity-framework\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Create CRUD in dotnet using dynamic data entity framework\" \/>\n<meta property=\"og:description\" content=\"Introduction: To develop website without coding. Create, update, read, delete screen for each table with parent child relation. Dynamic data driven from database for basic data operations. Overview: This website helps to cross check the table\u2019s relation by actually inserting and manipulating relevant data using input screens. Cross check data flows as expected or not,... Read More\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.esds.co.in\/kb\/create-crud-in-dotnet-using-dynamic-data-entity-framework\/\" \/>\n<meta property=\"og:site_name\" content=\"ESDS Official Knowledgebase\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/ESDSdc\/\" \/>\n<meta property=\"article:published_time\" content=\"2013-12-06T11:17:54+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-11-30T06:22:24+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.esds.co.in\/kb\/wp-content\/uploads\/2013\/12\/1.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@ESDSDataCenter\" \/>\n<meta name=\"twitter:site\" content=\"@ESDSDataCenter\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\">\n\t<meta name=\"twitter:data1\" content=\"2 minutes\">\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.esds.co.in\/kb\/#website\",\"url\":\"https:\/\/www.esds.co.in\/kb\/\",\"name\":\"ESDS Official Knowledgebase\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"https:\/\/www.esds.co.in\/kb\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.esds.co.in\/kb\/create-crud-in-dotnet-using-dynamic-data-entity-framework\/#primaryimage\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/www.esds.co.in\/kb\/wp-content\/uploads\/2013\/12\/1.png\",\"width\":492,\"height\":306},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.esds.co.in\/kb\/create-crud-in-dotnet-using-dynamic-data-entity-framework\/#webpage\",\"url\":\"https:\/\/www.esds.co.in\/kb\/create-crud-in-dotnet-using-dynamic-data-entity-framework\/\",\"name\":\"Create CRUD in dotnet using dynamic data entity framework\",\"isPartOf\":{\"@id\":\"https:\/\/www.esds.co.in\/kb\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.esds.co.in\/kb\/create-crud-in-dotnet-using-dynamic-data-entity-framework\/#primaryimage\"},\"datePublished\":\"2013-12-06T11:17:54+00:00\",\"dateModified\":\"2017-11-30T06:22:24+00:00\",\"author\":{\"@id\":\"https:\/\/www.esds.co.in\/kb\/#\/schema\/person\/606800cb380689731f428589fae1728e\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.esds.co.in\/kb\/create-crud-in-dotnet-using-dynamic-data-entity-framework\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.esds.co.in\/kb\/create-crud-in-dotnet-using-dynamic-data-entity-framework\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.esds.co.in\/kb\/create-crud-in-dotnet-using-dynamic-data-entity-framework\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.esds.co.in\/kb\/\",\"url\":\"https:\/\/www.esds.co.in\/kb\/\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"position\":2,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.esds.co.in\/kb\/create-crud-in-dotnet-using-dynamic-data-entity-framework\/\",\"url\":\"https:\/\/www.esds.co.in\/kb\/create-crud-in-dotnet-using-dynamic-data-entity-framework\/\",\"name\":\"Create CRUD in dotnet using dynamic data entity framework\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.esds.co.in\/kb\/#\/schema\/person\/606800cb380689731f428589fae1728e\",\"name\":\"Roshan Patil\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.esds.co.in\/kb\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/6e5f76feea0215801aaf8c2fd39506c3?s=96&d=mm&r=g\",\"caption\":\"Roshan Patil\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","_links":{"self":[{"href":"https:\/\/www.esds.co.in\/kb\/wp-json\/wp\/v2\/posts\/1534"}],"collection":[{"href":"https:\/\/www.esds.co.in\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.esds.co.in\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.esds.co.in\/kb\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/www.esds.co.in\/kb\/wp-json\/wp\/v2\/comments?post=1534"}],"version-history":[{"count":9,"href":"https:\/\/www.esds.co.in\/kb\/wp-json\/wp\/v2\/posts\/1534\/revisions"}],"predecessor-version":[{"id":3415,"href":"https:\/\/www.esds.co.in\/kb\/wp-json\/wp\/v2\/posts\/1534\/revisions\/3415"}],"wp:attachment":[{"href":"https:\/\/www.esds.co.in\/kb\/wp-json\/wp\/v2\/media?parent=1534"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.esds.co.in\/kb\/wp-json\/wp\/v2\/categories?post=1534"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.esds.co.in\/kb\/wp-json\/wp\/v2\/tags?post=1534"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}