{"id":944,"date":"2021-10-29T13:34:46","date_gmt":"2021-10-29T00:34:46","guid":{"rendered":"https:\/\/blog.wiseowls.co.nz\/?p=944"},"modified":"2021-10-29T13:34:47","modified_gmt":"2021-10-29T00:34:47","slug":"ef-core-6-custom-functions-with-dbfunction-attribute","status":"publish","type":"post","link":"https:\/\/blog.wiseowls.co.nz\/index.php\/2021\/10\/29\/ef-core-6-custom-functions-with-dbfunction-attribute\/","title":{"rendered":"EF Core 6 &#8211; custom functions with DbFunction Attribute"},"content":{"rendered":"\n<p>We&#8217;ve already looked at way to implement SQL functions via <a href=\"https:\/\/blog.wiseowls.co.nz\/index.php\/2020\/01\/26\/custom-functions-ef-core-3\/\">method translation<\/a>. That went reasonably well, but next time we had to do something similar we discovered that our code is broken with newer versions of EF Core. We <a href=\"https:\/\/blog.wiseowls.co.nz\/index.php\/2021\/08\/18\/ef-core-6-0-does-our-imethodcalltranslator-hack-still-work\/\">fixed it again<\/a>. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Not anymore<\/h2>\n\n\n\n<p>Looking through changelogs, we noticed that EF Core 2.0 came with support for <a href=\"https:\/\/docs.microsoft.com\/en-us\/ef\/core\/what-is-new\/ef-core-2.0\/#database-scalar-function-mapping\">mapping scalar functions<\/a>. It is remarkably simple to set up:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"csharp\" class=\"language-csharp\">public class MyDbContext : DbContext\n    {\n\n        [DbFunction(\"DECRYPTBYPASSPHRASE\", IsBuiltIn = true, IsNullable = false)]\n        public static byte[] DecryptByPassphrase(string pass, byte[] ciphertext) =&gt; throw new NotImplementedException();\n\n        [DbFunction(\"DECRYPTBYKEY\", IsBuiltIn = true, IsNullable = false)]\n        public static byte[] DecryptByKey(byte[] ciphertext) =&gt; throw new NotImplementedException();\n...<\/code><\/pre>\n\n\n\n<p>and even easier to use:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"csharp\" class=\"language-csharp\">var filteredSet = Set\n                .Select(m =&gt; new Model\n                {\n                    Id = m.Id,\n                    Decrypted = MyDbContext.DecryptByPassphrase(\"TestPassword\", m.Encrypted).ToString(),\n                    Decrypted2 = MyDbContext.DecryptByKey(m.Encrypted2).ToString(), \/\/ since the key's opened for session scope - just relying on it should do the trick\n                }).ToList();<\/code><\/pre>\n\n\n\n<p>Initially the attribute was offering limited configuration options, but starting EF Core 5.0, <a href=\"https:\/\/docs.microsoft.com\/en-us\/dotnet\/api\/microsoft.entityframeworkcore.dbfunctionattribute?view=efcore-5.0#properties\">this is not an issue<\/a>.<\/p>\n\n\n\n<p>One gotcha with <code>DECRYPT*<\/code> functions is they return <code>varbinary<\/code>. Trying to use our own <code>EF.Functions.ConvertToVarChar<\/code> is not going to work since we disabled custom plugins. We want to get rid of this code after all. But Apparently <code>.ToString()<\/code> works as intended:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">SELECT [m].[Id], CONVERT(varchar(100), DECRYPTBYPASSPHRASE(N'TestPassword', [m].[Encrypted])) AS [Decrypted], CONVERT(varchar(100), DECRYPTBYKEY([m].[Encrypted2])) AS [Decrypted2], [t].[Id], [t].[IsSomething], [m].[Encrypted], [m].[Encrypted2]...<\/code><\/pre>\n\n\n\n<p>Full example source is <a href=\"https:\/\/github.com\/tkhadimullin\/ef-core-custom-functions\/tree\/feature\/ef-6.0-dbfunction\">in GitHub<\/a>, along with other takes we decided to leave in place for history.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>Defining custom EF functions was one of the biggest articles we wrote here. And finding out how to fit it together probably was the most challenging and time-consuming project we undertook in recorded history. One can say we totally wasted our time, but I&#8217;d like to draw a different conclusion. We had fun, learned something new and were able to appreciate the complexity behind Entity Framework &#8211; it is not just an engineering marvel &#8211; it is also a magical beast!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We&#8217;ve already looked at way to implement SQL functions via method translation. That went reasonably well, but next time we had to do something similar we discovered that our code is broken with newer versions of EF Core. We fixed it again. Not anymore Looking through changelogs, we noticed that EF Core 2.0 came with &hellip; <a href=\"https:\/\/blog.wiseowls.co.nz\/index.php\/2021\/10\/29\/ef-core-6-custom-functions-with-dbfunction-attribute\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;EF Core 6 &#8211; custom functions with DbFunction Attribute&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":391,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[11],"tags":[12,23],"class_list":["post-944","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dev","tag-c","tag-ef-core"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>EF Core 6 - custom functions with DbFunction Attribute - Timur and associates<\/title>\n<meta name=\"description\" content=\"We have looked into different ways to map custom SQL functions with EF Core. Today we&#039;ll explore what is likely the easiest of them all.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blog.wiseowls.co.nz\/index.php\/2021\/10\/29\/ef-core-6-custom-functions-with-dbfunction-attribute\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"EF Core 6 - custom functions with DbFunction Attribute - Timur and associates\" \/>\n<meta property=\"og:description\" content=\"We have looked into different ways to map custom SQL functions with EF Core. Today we&#039;ll explore what is likely the easiest of them all.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/blog.wiseowls.co.nz\/index.php\/2021\/10\/29\/ef-core-6-custom-functions-with-dbfunction-attribute\/\" \/>\n<meta property=\"og:site_name\" content=\"Timur and associates\" \/>\n<meta property=\"article:published_time\" content=\"2021-10-29T00:34:46+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-10-29T00:34:47+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/blog.wiseowls.co.nz\/wp-content\/uploads\/2020\/02\/tobias-fischer-PkbZahEG2Ng-unsplash-scaled-e1582017537106.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1980\" \/>\n\t<meta property=\"og:image:height\" content=\"801\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"timur\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@TimurKh\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/blog.wiseowls.co.nz\\\/index.php\\\/2021\\\/10\\\/29\\\/ef-core-6-custom-functions-with-dbfunction-attribute\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/blog.wiseowls.co.nz\\\/index.php\\\/2021\\\/10\\\/29\\\/ef-core-6-custom-functions-with-dbfunction-attribute\\\/\"},\"author\":{\"name\":\"timur\",\"@id\":\"https:\\\/\\\/blog.wiseowls.co.nz\\\/#\\\/schema\\\/person\\\/34d0ed30d573b5bc317ea990bd2e0c59\"},\"headline\":\"EF Core 6 &#8211; custom functions with DbFunction Attribute\",\"datePublished\":\"2021-10-29T00:34:46+00:00\",\"dateModified\":\"2021-10-29T00:34:47+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/blog.wiseowls.co.nz\\\/index.php\\\/2021\\\/10\\\/29\\\/ef-core-6-custom-functions-with-dbfunction-attribute\\\/\"},\"wordCount\":233,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/blog.wiseowls.co.nz\\\/index.php\\\/2021\\\/10\\\/29\\\/ef-core-6-custom-functions-with-dbfunction-attribute\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/blog.wiseowls.co.nz\\\/wp-content\\\/uploads\\\/2020\\\/02\\\/tobias-fischer-PkbZahEG2Ng-unsplash-scaled-e1582017537106.jpg\",\"keywords\":[\"c#\",\"ef-core\"],\"articleSection\":[\"Development\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/blog.wiseowls.co.nz\\\/index.php\\\/2021\\\/10\\\/29\\\/ef-core-6-custom-functions-with-dbfunction-attribute\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/blog.wiseowls.co.nz\\\/index.php\\\/2021\\\/10\\\/29\\\/ef-core-6-custom-functions-with-dbfunction-attribute\\\/\",\"url\":\"https:\\\/\\\/blog.wiseowls.co.nz\\\/index.php\\\/2021\\\/10\\\/29\\\/ef-core-6-custom-functions-with-dbfunction-attribute\\\/\",\"name\":\"EF Core 6 - custom functions with DbFunction Attribute - Timur and associates\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/blog.wiseowls.co.nz\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/blog.wiseowls.co.nz\\\/index.php\\\/2021\\\/10\\\/29\\\/ef-core-6-custom-functions-with-dbfunction-attribute\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/blog.wiseowls.co.nz\\\/index.php\\\/2021\\\/10\\\/29\\\/ef-core-6-custom-functions-with-dbfunction-attribute\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/blog.wiseowls.co.nz\\\/wp-content\\\/uploads\\\/2020\\\/02\\\/tobias-fischer-PkbZahEG2Ng-unsplash-scaled-e1582017537106.jpg\",\"datePublished\":\"2021-10-29T00:34:46+00:00\",\"dateModified\":\"2021-10-29T00:34:47+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/blog.wiseowls.co.nz\\\/#\\\/schema\\\/person\\\/34d0ed30d573b5bc317ea990bd2e0c59\"},\"description\":\"We have looked into different ways to map custom SQL functions with EF Core. Today we'll explore what is likely the easiest of them all.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/blog.wiseowls.co.nz\\\/index.php\\\/2021\\\/10\\\/29\\\/ef-core-6-custom-functions-with-dbfunction-attribute\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/blog.wiseowls.co.nz\\\/index.php\\\/2021\\\/10\\\/29\\\/ef-core-6-custom-functions-with-dbfunction-attribute\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/blog.wiseowls.co.nz\\\/index.php\\\/2021\\\/10\\\/29\\\/ef-core-6-custom-functions-with-dbfunction-attribute\\\/#primaryimage\",\"url\":\"https:\\\/\\\/blog.wiseowls.co.nz\\\/wp-content\\\/uploads\\\/2020\\\/02\\\/tobias-fischer-PkbZahEG2Ng-unsplash-scaled-e1582017537106.jpg\",\"contentUrl\":\"https:\\\/\\\/blog.wiseowls.co.nz\\\/wp-content\\\/uploads\\\/2020\\\/02\\\/tobias-fischer-PkbZahEG2Ng-unsplash-scaled-e1582017537106.jpg\",\"width\":1980,\"height\":801},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/blog.wiseowls.co.nz\\\/index.php\\\/2021\\\/10\\\/29\\\/ef-core-6-custom-functions-with-dbfunction-attribute\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/blog.wiseowls.co.nz\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"EF Core 6 &#8211; custom functions with DbFunction Attribute\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/blog.wiseowls.co.nz\\\/#website\",\"url\":\"https:\\\/\\\/blog.wiseowls.co.nz\\\/\",\"name\":\"Timur and associates\",\"description\":\"Notes of an IT contractor\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/blog.wiseowls.co.nz\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/blog.wiseowls.co.nz\\\/#\\\/schema\\\/person\\\/34d0ed30d573b5bc317ea990bd2e0c59\",\"name\":\"timur\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/23d55e17d4f0990ee4d12bc6e5dcfb58a292934efd62a185756876379e780b16?s=96&r=pg\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/23d55e17d4f0990ee4d12bc6e5dcfb58a292934efd62a185756876379e780b16?s=96&r=pg\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/23d55e17d4f0990ee4d12bc6e5dcfb58a292934efd62a185756876379e780b16?s=96&r=pg\",\"caption\":\"timur\"},\"sameAs\":[\"https:\\\/\\\/x.com\\\/TimurKh\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"EF Core 6 - custom functions with DbFunction Attribute - Timur and associates","description":"We have looked into different ways to map custom SQL functions with EF Core. Today we'll explore what is likely the easiest of them all.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/blog.wiseowls.co.nz\/index.php\/2021\/10\/29\/ef-core-6-custom-functions-with-dbfunction-attribute\/","og_locale":"en_US","og_type":"article","og_title":"EF Core 6 - custom functions with DbFunction Attribute - Timur and associates","og_description":"We have looked into different ways to map custom SQL functions with EF Core. Today we'll explore what is likely the easiest of them all.","og_url":"https:\/\/blog.wiseowls.co.nz\/index.php\/2021\/10\/29\/ef-core-6-custom-functions-with-dbfunction-attribute\/","og_site_name":"Timur and associates","article_published_time":"2021-10-29T00:34:46+00:00","article_modified_time":"2021-10-29T00:34:47+00:00","og_image":[{"width":1980,"height":801,"url":"https:\/\/blog.wiseowls.co.nz\/wp-content\/uploads\/2020\/02\/tobias-fischer-PkbZahEG2Ng-unsplash-scaled-e1582017537106.jpg","type":"image\/jpeg"}],"author":"timur","twitter_card":"summary_large_image","twitter_creator":"@TimurKh","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/blog.wiseowls.co.nz\/index.php\/2021\/10\/29\/ef-core-6-custom-functions-with-dbfunction-attribute\/#article","isPartOf":{"@id":"https:\/\/blog.wiseowls.co.nz\/index.php\/2021\/10\/29\/ef-core-6-custom-functions-with-dbfunction-attribute\/"},"author":{"name":"timur","@id":"https:\/\/blog.wiseowls.co.nz\/#\/schema\/person\/34d0ed30d573b5bc317ea990bd2e0c59"},"headline":"EF Core 6 &#8211; custom functions with DbFunction Attribute","datePublished":"2021-10-29T00:34:46+00:00","dateModified":"2021-10-29T00:34:47+00:00","mainEntityOfPage":{"@id":"https:\/\/blog.wiseowls.co.nz\/index.php\/2021\/10\/29\/ef-core-6-custom-functions-with-dbfunction-attribute\/"},"wordCount":233,"commentCount":0,"image":{"@id":"https:\/\/blog.wiseowls.co.nz\/index.php\/2021\/10\/29\/ef-core-6-custom-functions-with-dbfunction-attribute\/#primaryimage"},"thumbnailUrl":"https:\/\/blog.wiseowls.co.nz\/wp-content\/uploads\/2020\/02\/tobias-fischer-PkbZahEG2Ng-unsplash-scaled-e1582017537106.jpg","keywords":["c#","ef-core"],"articleSection":["Development"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/blog.wiseowls.co.nz\/index.php\/2021\/10\/29\/ef-core-6-custom-functions-with-dbfunction-attribute\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/blog.wiseowls.co.nz\/index.php\/2021\/10\/29\/ef-core-6-custom-functions-with-dbfunction-attribute\/","url":"https:\/\/blog.wiseowls.co.nz\/index.php\/2021\/10\/29\/ef-core-6-custom-functions-with-dbfunction-attribute\/","name":"EF Core 6 - custom functions with DbFunction Attribute - Timur and associates","isPartOf":{"@id":"https:\/\/blog.wiseowls.co.nz\/#website"},"primaryImageOfPage":{"@id":"https:\/\/blog.wiseowls.co.nz\/index.php\/2021\/10\/29\/ef-core-6-custom-functions-with-dbfunction-attribute\/#primaryimage"},"image":{"@id":"https:\/\/blog.wiseowls.co.nz\/index.php\/2021\/10\/29\/ef-core-6-custom-functions-with-dbfunction-attribute\/#primaryimage"},"thumbnailUrl":"https:\/\/blog.wiseowls.co.nz\/wp-content\/uploads\/2020\/02\/tobias-fischer-PkbZahEG2Ng-unsplash-scaled-e1582017537106.jpg","datePublished":"2021-10-29T00:34:46+00:00","dateModified":"2021-10-29T00:34:47+00:00","author":{"@id":"https:\/\/blog.wiseowls.co.nz\/#\/schema\/person\/34d0ed30d573b5bc317ea990bd2e0c59"},"description":"We have looked into different ways to map custom SQL functions with EF Core. Today we'll explore what is likely the easiest of them all.","breadcrumb":{"@id":"https:\/\/blog.wiseowls.co.nz\/index.php\/2021\/10\/29\/ef-core-6-custom-functions-with-dbfunction-attribute\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.wiseowls.co.nz\/index.php\/2021\/10\/29\/ef-core-6-custom-functions-with-dbfunction-attribute\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blog.wiseowls.co.nz\/index.php\/2021\/10\/29\/ef-core-6-custom-functions-with-dbfunction-attribute\/#primaryimage","url":"https:\/\/blog.wiseowls.co.nz\/wp-content\/uploads\/2020\/02\/tobias-fischer-PkbZahEG2Ng-unsplash-scaled-e1582017537106.jpg","contentUrl":"https:\/\/blog.wiseowls.co.nz\/wp-content\/uploads\/2020\/02\/tobias-fischer-PkbZahEG2Ng-unsplash-scaled-e1582017537106.jpg","width":1980,"height":801},{"@type":"BreadcrumbList","@id":"https:\/\/blog.wiseowls.co.nz\/index.php\/2021\/10\/29\/ef-core-6-custom-functions-with-dbfunction-attribute\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/blog.wiseowls.co.nz\/"},{"@type":"ListItem","position":2,"name":"EF Core 6 &#8211; custom functions with DbFunction Attribute"}]},{"@type":"WebSite","@id":"https:\/\/blog.wiseowls.co.nz\/#website","url":"https:\/\/blog.wiseowls.co.nz\/","name":"Timur and associates","description":"Notes of an IT contractor","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blog.wiseowls.co.nz\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/blog.wiseowls.co.nz\/#\/schema\/person\/34d0ed30d573b5bc317ea990bd2e0c59","name":"timur","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/23d55e17d4f0990ee4d12bc6e5dcfb58a292934efd62a185756876379e780b16?s=96&r=pg","url":"https:\/\/secure.gravatar.com\/avatar\/23d55e17d4f0990ee4d12bc6e5dcfb58a292934efd62a185756876379e780b16?s=96&r=pg","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/23d55e17d4f0990ee4d12bc6e5dcfb58a292934efd62a185756876379e780b16?s=96&r=pg","caption":"timur"},"sameAs":["https:\/\/x.com\/TimurKh"]}]}},"_links":{"self":[{"href":"https:\/\/blog.wiseowls.co.nz\/index.php\/wp-json\/wp\/v2\/posts\/944","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.wiseowls.co.nz\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.wiseowls.co.nz\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.wiseowls.co.nz\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.wiseowls.co.nz\/index.php\/wp-json\/wp\/v2\/comments?post=944"}],"version-history":[{"count":7,"href":"https:\/\/blog.wiseowls.co.nz\/index.php\/wp-json\/wp\/v2\/posts\/944\/revisions"}],"predecessor-version":[{"id":1068,"href":"https:\/\/blog.wiseowls.co.nz\/index.php\/wp-json\/wp\/v2\/posts\/944\/revisions\/1068"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.wiseowls.co.nz\/index.php\/wp-json\/wp\/v2\/media\/391"}],"wp:attachment":[{"href":"https:\/\/blog.wiseowls.co.nz\/index.php\/wp-json\/wp\/v2\/media?parent=944"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.wiseowls.co.nz\/index.php\/wp-json\/wp\/v2\/categories?post=944"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.wiseowls.co.nz\/index.php\/wp-json\/wp\/v2\/tags?post=944"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}