{"id":236,"date":"2021-03-04T11:50:53","date_gmt":"2021-03-04T03:50:53","guid":{"rendered":"https:\/\/www.tonghin.com.my\/blog\/?p=236"},"modified":"2021-03-04T11:50:55","modified_gmt":"2021-03-04T03:50:55","slug":"entity-framework-core-week","status":"publish","type":"post","link":"https:\/\/www.tonghin.com.my\/blog\/2021\/03\/04\/entity-framework-core-week\/","title":{"rendered":"Entity Framework Core Week"},"content":{"rendered":"\n<p>Getting familiar with EF Core is not easy at all. <\/p>\n\n\n\n<p>Last week was hectic, I really had a lot of trouble trying to understand how EF Core works and understanding its concept, to the extent that I told my parents, I guess my supervisor regrets taking me as an intern, hahhahah. <\/p>\n\n\n\n<p>So entity framework can simply be defined as an object which maps database to .NET. Mainly, Entity Framework (EF) and Entity Framework Core exist, such that the latter is an advanced version of EF and it supports features that EF cannot support .<\/p>\n\n\n\n<p>EF Core is what we use at Tong Hin. It works by creating model classes and context objects which represent sessions with the database. Migrations are then used to create the database and update it as the model evolves and changes. EF Core supports relationships in database, ranging from One-to-One relationships, One-to-Many relationships, and Many-to-Many relationships.<\/p>\n\n\n\n<p>EF Core can be used for querying and retrieving data from the database, save, edit and delete data. Taking note that all these functions are done in the model class of the entities. <\/p>\n\n\n\n<p>The concept of EF Core is a lot, I will mention more about it in the next upcoming blogs.<\/p>\n\n\n\n<p>Next, I was introduced to fluent assertion, which makes the assertion statement readable to anyone who has a look at the codes instead of using the statement <span class=\"has-inline-color has-accent-color\">Assert(2, 4)<\/span>, the following statement is more readable and understandable <span class=\"has-inline-color has-accent-color\">Answer.Should( ).Equal(2)<\/span>.  <\/p>\n\n\n\n<p>Clean code is a concept which involves ensuring that the codes written are easier to understand and are easier to change. Clean code can be written by adhering to the following basic guidelines which are, writing meaningful names, writing correct comments, following the standardized format of code writing, removing and refactoring unnecessary classes, and many other guidelines that can ensure that the codes written are considered as a clean code. <\/p>\n\n\n\n<p>See you all next week again \ud83d\ude42 <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Getting familiar with EF Core is not easy at all. Last week was hectic, I really had a lot of trouble trying to understand how EF Core works and understanding its concept, to the extent that I told my parents, I guess my supervisor regrets taking me as an intern, hahhahah. So entity framework can &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.tonghin.com.my\/blog\/2021\/03\/04\/entity-framework-core-week\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Entity Framework Core Week&#8221;<\/span><\/a><\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[5],"tags":[73,71,72,67],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v15.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Entity Framework Core Week | Tong Hin&#039;s Blog<\/title>\n<meta name=\"description\" content=\"Entity Framework definition and its basic concept. Fluent assertions and guidelines to write a clean code.\" \/>\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.tonghin.com.my\/blog\/2021\/03\/04\/entity-framework-core-week\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Entity Framework Core Week | Tong Hin&#039;s Blog\" \/>\n<meta property=\"og:description\" content=\"Entity Framework definition and its basic concept. Fluent assertions and guidelines to write a clean code.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.tonghin.com.my\/blog\/2021\/03\/04\/entity-framework-core-week\/\" \/>\n<meta property=\"og:site_name\" content=\"Tong Hin&#039;s Blog\" \/>\n<meta property=\"article:published_time\" content=\"2021-03-04T03:50:53+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-03-04T03:50:55+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\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\":\"Organization\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#organization\",\"name\":\"TONG HIN MACHINERY\",\"url\":\"https:\/\/www.tonghin.com.my\/blog\/\",\"sameAs\":[\"https:\/\/www.youtube.com\/channel\/UC60EoxJMNbu8mV0LuEGfrBg\"],\"logo\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#logo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/www.tonghin.com.my\/blog\/wp-content\/uploads\/2020\/10\/web_logo_180_180.jpg\",\"width\":180,\"height\":180,\"caption\":\"TONG HIN MACHINERY\"},\"image\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#logo\"}},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#website\",\"url\":\"https:\/\/www.tonghin.com.my\/blog\/\",\"name\":\"Tong Hin&#039;s Blog\",\"description\":\"Sharing About Technology\",\"publisher\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"https:\/\/www.tonghin.com.my\/blog\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2021\/03\/04\/entity-framework-core-week\/#webpage\",\"url\":\"https:\/\/www.tonghin.com.my\/blog\/2021\/03\/04\/entity-framework-core-week\/\",\"name\":\"Entity Framework Core Week | Tong Hin&#039;s Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#website\"},\"datePublished\":\"2021-03-04T03:50:53+00:00\",\"dateModified\":\"2021-03-04T03:50:55+00:00\",\"description\":\"Entity Framework definition and its basic concept. Fluent assertions and guidelines to write a clean code.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2021\/03\/04\/entity-framework-core-week\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.tonghin.com.my\/blog\/2021\/03\/04\/entity-framework-core-week\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2021\/03\/04\/entity-framework-core-week\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/\",\"url\":\"https:\/\/www.tonghin.com.my\/blog\/\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"position\":2,\"item\":{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2021\/03\/04\/entity-framework-core-week\/\",\"url\":\"https:\/\/www.tonghin.com.my\/blog\/2021\/03\/04\/entity-framework-core-week\/\",\"name\":\"Entity Framework Core Week\"}}]},{\"@type\":\"Article\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2021\/03\/04\/entity-framework-core-week\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2021\/03\/04\/entity-framework-core-week\/#webpage\"},\"author\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#\/schema\/person\/11b81d489377d44deb601a79a57599ee\"},\"headline\":\"Entity Framework Core Week\",\"datePublished\":\"2021-03-04T03:50:53+00:00\",\"dateModified\":\"2021-03-04T03:50:55+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/2021\/03\/04\/entity-framework-core-week\/#webpage\"},\"commentCount\":1,\"publisher\":{\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#organization\"},\"keywords\":\"Clean Code,EF,EF Core,Fluent Assertion\",\"articleSection\":\"Experiential\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.tonghin.com.my\/blog\/2021\/03\/04\/entity-framework-core-week\/#respond\"]}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#\/schema\/person\/11b81d489377d44deb601a79a57599ee\",\"name\":\"Faizah Chaibou\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.tonghin.com.my\/blog\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/5c69df35ce6d69b7d1b66311b4144ea8?s=96&d=mm&r=g\",\"caption\":\"Faizah Chaibou\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","_links":{"self":[{"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/posts\/236"}],"collection":[{"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/comments?post=236"}],"version-history":[{"count":7,"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/posts\/236\/revisions"}],"predecessor-version":[{"id":251,"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/posts\/236\/revisions\/251"}],"wp:attachment":[{"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/media?parent=236"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/categories?post=236"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tonghin.com.my\/blog\/wp-json\/wp\/v2\/tags?post=236"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}