ravendb

Data access architectures with Raven DB

佐手、 提交于 2019-12-03 02:25:23
What data access architectures are available that I can use with Raven DB? Basically, I want to separate persistence via interfaces, so I don't expose underline storage to the upper layers. I.e. I don't want my domain to see IDocumentStore or IDocumentSession which are from Raven DB. I have implemented the generic repository pattern and that seems to work. However, I am not sure that is actually the correct approach. Maybe I shall go towards command-query segregation or something else? What are your thoughts? Personally, I'm not really experienced with the Command Pattern. I saw that it was

Does Mongo DB have an In-Memory mode? [duplicate]

╄→гoц情女王★ 提交于 2019-12-03 01:12:14
This question already has answers here : Embedded MongoDB when running integration tests (13 answers) Possible Duplicate: Embedded MongoDB when running integration tests I want to use In-Memory mode for unit test, is there an in In-Memory mode like RavenDB? Dmitry Reznik There is no in-memory mode for MongoDB. As per this link, this feature won't be included until at least MongoDB 2.8. Though since it's using Memory-mapped IO, it should be as speedy as in-memory during the actual processing. Not the startup though. Also, there's a hack to use RAM disk drive and put your mongo db there. That

RavenDB Network Access

别说谁变了你拦得住时间么 提交于 2019-12-03 00:41:44
I'm having a difficult time finding information on how to get RavenDB to work on a network. Within the same network, I can have an instance of my app running, and it will show data from my RavenDB. However, when I try to write data, I get a 401 Unauthorized exception. What is the correct way to set up a RavenDB to be accessed over the network? Right now, I have this in Raven.Server.exe.config , which is just a short-term solution: <add key="Raven/AnonymousAccess" value="All" /> What I don't understand, is that the RavenDB web site says to use something like this: <connectionStrings> <add name=

Register RavenDb using Autofac?

∥☆過路亽.° 提交于 2019-12-03 00:12:22
Can anyone guide me on how I could register RavenDB using Autofac? builder.Register<DocumentStore>( .. what after that? Matt Johnson Here is a sample console program that illustrates not only how to wire up the document store, but also how to set it up so you can just inject your document session: using System.Threading.Tasks; using Autofac; using Raven.Client; using Raven.Client.Document; namespace ConsoleApplication1 { internal class Program { private static void Main() { var builder = new ContainerBuilder(); // Register the document store as single instance, // initializing it on first use.

Nuget dependency error installing RavenDb Embedded

喜你入骨 提交于 2019-12-02 23:39:07
I am trying to install RavenDB.Embedded in an ASP.NET MVC 5 application, but I have this dependency error: PM> Install-Package RavenDB.Embedded Attempting to resolve dependency 'RavenDB.Database (= 2.5.2750)'. Attempting to resolve dependency 'System.Spatial (≥ 5.2)'. Attempting to resolve dependency 'WindowsAzure.Storage (≥ 2.0)'. Attempting to resolve dependency 'Microsoft.WindowsAzure.ConfigurationManager (≥ 1.7.0.0)'. Attempting to resolve dependency 'Microsoft.Data.OData (≥ 5.0.2)'. Attempting to resolve dependency 'Microsoft.Data.Edm (= 5.0.2)'. Attempting to resolve dependency 'System

Raven DB: How can I delete all documents of a given type

两盒软妹~` 提交于 2019-12-02 22:40:46
More specifically in Raven DB, I want to create a generic method with a signature like; public void Clear<T>() {... Then have Raven DB clear all documents of the given type. I understand from other posts by Ayende to similar questions that you'd need an index in place to do this as a batch. I think this would involve creating an index that maps each document type - this seems like a lot of work. Does anyone know an efficient way of creating a method like the above that will do a set delete directly in the database? alexn I assume you want to do this from the .NET client. If so, use the

Securing the Raven Database

笑着哭i 提交于 2019-12-02 20:24:40
问题 I'm trying to restrict access to our RavenDB to only one user. After altering the settings to secure the DB, I can still access the RavenDB management studio and I'm not sure why. I'm running RavenDB as a windows service, and I'm using build 573. This is my Raven.Server.exe.config: <?xml version="1.0" encoding="utf-8" ?> <configuration> <appSettings> <add key="Raven/Port" value="*"/> <add key="Raven/DataDir" value="~\Data"/> <add key="Raven/AnonymousAccess" value="None"/> <!-- Settings are

Membership systems for MVC4 that support RavenDB

ε祈祈猫儿з 提交于 2019-12-02 19:31:32
I create a lot of quick "proof of concept" MVC apps and I actually found the SimpleMembership provider that shipped with the MVC4 templates to be very handy since it gets me up and running with user registration & OAuth in a matter of minutes. But...I've started to use RavenDb (on RavenHQ for a lot for my projects). So, I starting trying to implement my own "custom membership provider" based on the ExtendedMembershipProvider and while doing that I realized that didn't make much sense. I later stumbled upon 2 interesting projects that try to solve this exact problem: WorldDomination.Web.Auth:

Retrieving entire data collection from a RavenDB

余生颓废 提交于 2019-12-02 19:14:29
I have a requirement where I need to fetch the entire data collection Users from RavenDB and compare the retrieved result set with another set of data. There are close to 4000 records in this particular collection. Because Raven is Safe By Default, I keep getting an exception for either Number of requests per session exceeded or it returns the maximum 128 records. I don't want to set the property Session.Advanced.MaxNumberOfRequestsPerSession to a higher value. What query should I use to get the count of all the records? What is the ideal approach to handle this situation? You use paging, and

How do I create a ClaimsIdentity object for Asp.NET MVC 5?

怎甘沉沦 提交于 2019-12-02 19:09:39
I am working in a .NET MVC 5 application. I do not want to use Entity Framework. I want to authenticate to a RavenDB database. It looks to me that I want to replace the UserManager that comes with the Account Controller. I think I can rewrite all the UserManager functions to work with my database, except I don't understand the ClaimsIdentity object. In the SignInAsync method, there is a call to UserManager.CreateIdentityAsync(...) . I know it returns a ClaimsIdentity object. What I don't know is how to create a ClaimsIdentity object on my own. I see that it has 4 properties Actor ,