<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ASP.NET Core Archives - Blog IT</title>
	<atom:link href="https://blogit.create.pt/tag/asp-net-core/feed/" rel="self" type="application/rss+xml" />
	<link>https://blogit.create.pt/tag/asp-net-core/</link>
	<description>Create IT blogger community</description>
	<lastBuildDate>Thu, 10 Jan 2019 12:46:08 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.1</generator>
	<item>
		<title>RavenDB embedded with ASP NET Core web API</title>
		<link>https://blogit.create.pt/ricardocosta/2018/09/04/ravendb-embedded-asp-net-core-web-api/</link>
					<comments>https://blogit.create.pt/ricardocosta/2018/09/04/ravendb-embedded-asp-net-core-web-api/#respond</comments>
		
		<dc:creator><![CDATA[Ricardo Costa]]></dc:creator>
		<pubDate>Tue, 04 Sep 2018 21:38:46 +0000</pubDate>
				<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET Core]]></category>
		<category><![CDATA[RavenDB]]></category>
		<guid isPermaLink="false">https://blogit.create.pt/?p=7417</guid>

					<description><![CDATA[<p>This post describes how you can set up a simple ASP NET Core web API with Visual Studio 2017 to use an embedded RavenDB. This is a step by step tutorial. a) You need to create a new ASP.NET Core Web Application with Visual Studio 2017 b) Choose .NET Core; ASP.NET Core 2.1; API c) [&#8230;]</p>
<p>The post <a href="https://blogit.create.pt/ricardocosta/2018/09/04/ravendb-embedded-asp-net-core-web-api/">RavenDB embedded with ASP NET Core web API</a> appeared first on <a href="https://blogit.create.pt">Blog IT</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>This post describes how you can set up a simple ASP NET Core web API with Visual Studio 2017 to use an embedded RavenDB. This is a step by step tutorial.</p>
<p>a) You need to create a new ASP.NET Core Web Application with Visual Studio 2017<br />
b) Choose .NET Core; ASP.NET Core 2.1; API<br />
c) Right click the new project -&gt; Manage NuGet packages<br />
d) You have to add a new package source. Settings. New package source.</p>
<p style="padding-left: 30px">Name: <a href="https://www.myget.org/F/ravendb/api/v3/index.json">MyGet</a><br />
Source: https://www.myget.org/F/ravendb/api/v3/index.json</p>
<p>e) Choose the new source. Add:</p>
<p style="padding-left: 30px">RavenDB.Embedded &#8211; 4.1.1-nightly-20180904-0430<br />
RavenDB.Client &#8211; 4.1.1-nightly-20180904-0430</p>
<p>f) Create a DocumentStoreHolder class</p>
<pre class="brush: csharp; title: ; notranslate">

internal class DocumentStoreHolder
{
    private static Lazy&lt;IDocumentStore&gt; store = new Lazy&lt;IDocumentStore&gt;(CreateStore);

    public static IDocumentStore Store =&gt; store.Value;

    private static IDocumentStore CreateStore()
    {
        var serverOptions = new ServerOptions()
        {
            ServerUrl = &quot;http://127.0.0.1:60956/&quot;,
        };
        EmbeddedServer.Instance.StartServer(serverOptions);

        return EmbeddedServer.Instance.GetDocumentStore(&quot;MyRavenDBStore&quot;);
    }
}

</pre>
<p>g) And that&#8217;s it 🙂</p>
<p>The post <a href="https://blogit.create.pt/ricardocosta/2018/09/04/ravendb-embedded-asp-net-core-web-api/">RavenDB embedded with ASP NET Core web API</a> appeared first on <a href="https://blogit.create.pt">Blog IT</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blogit.create.pt/ricardocosta/2018/09/04/ravendb-embedded-asp-net-core-web-api/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
