Skip to content

A wrapper that allows you to easily use a RavenDB Embedded NoSQL database : Add, Update, Delete and Query without any configuration.

License

Notifications You must be signed in to change notification settings

YoannBureau/RavenDBEmbeddedTools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

RavenDBEmbeddedTools

A wrapper that allows you to easily use a RavenDB Embedded NoSQL database : Add, Update, Delete and Query without any configuration.

Install

Install-Package RavenDBEmbeddedTools

How to use easily

Assuming the following class:

public class Person
{
    public string Id { get; set; }
    public string FirstName { get; set; }
    public string LastName { get; set; }
}

Insert

var person = new Person() { FirstName = "Peter", LastName = "Smith" };
RavenDBGenericCommands<Person>.Insert(person);

Update

RavenDBGenericCommands<Person>.Update(myInstanceOfPerson);

Delete

RavenDBGenericCommands<Person>.Delete(myInstanceOfPerson.Id);

GetAll

var persons = RavenDBGenericCommands<Person>.GetAll();

GetById

var person = RavenDBGenericCommands<Person>.GetById("people/1");

GetByFunc

Func<Person, bool> searchFunc = (x) => x.LastName.Contains("Smith");
var persons = RavenDBGenericCommands<Person>.GetByFunc(searchFunc);

Count

var personCount = RavenDBGenericCommands<Person>.Count();

About

A wrapper that allows you to easily use a RavenDB Embedded NoSQL database : Add, Update, Delete and Query without any configuration.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages