🖋️
StackExchange Redis Extensions
  • Home
  • Setup
  • Dependency Injection
  • Configuration
    • C# Configuration
    • Json Configuration
    • XML Configuration
  • Serializers
    • Newtonsoft Json.Net
    • MsgPack
    • System.Text.Json
  • Packages
  • Usage
    • Add, retrieve and remove complex object
    • Replace an object
    • Work with multiple items
    • Custom serializer
  • ASP.NET Core
    • Expose redis information
  • Helpful link
  • License
  • Work with the code
    • Unit tests
  • Usages
Powered by GitBook
On this page

Was this helpful?

Usage

PreviousPackagesNextAdd, retrieve and remove complex object

Last updated 5 years ago

Was this helpful?

There are multiple api that the library offers, here a list:

  • ;

  • ;

  • ;

  • Search Keys into Redis;

  • Store multiple object with a single roundtrip;

  • Get Redis Server information;

  • Set Add;

  • Set AddAdd;

  • SetRemove;

  • SetRemoveAll;

  • Set Member;

  • Pub/Sub events;

  • Save;

  • Async methods;

  • Hash methods;

  • Support for Keyspace isolation;

  • Support for multiple database:

Note that all the example are based on a c# object like this:

public class User
{
    public UserDocument()
    {
        Company = new CompanyDocument();
    }

    public string Username { get; set; }
    public string FirstName { get; set; }
    public string LastName { get; set; }
    public string Email { get; set; }
    public CultureInfo Culture { get; set; }
    public string TimeZoneId { get; set; }
    public bool EmailConfirmed { get; set; }
    public Company Company { get; set; }
}

public class Company
{
    public string Name { get; set; }
    public string Vat { get; set; }
    public string Address { get; set; }
    public string District { get; set; }
    public string Zipcode { get; set; }
    public string City { get; set; }
    public string Phone { get; set; }
    public string Fax { get; set; }
    public string Country { get; set; }
}

Your class could be everything is serializable.

Add, retrieve and remove complex object
Replace an object
Custom Serialization
Work with multiple items;