Skip to content

Latest commit

 

History

History
54 lines (48 loc) · 1.96 KB

File metadata and controls

54 lines (48 loc) · 1.96 KB

Usage

The main entry point for interacting with Redis is the IRedisDatabase interface, which you inject via dependency injection. Here is a list of the features the library offers:

Note that all the examples are based on a C# object like this:

public class User
{
    public string Username { get; set; } = string.Empty;
    public string FirstName { get; set; } = string.Empty;
    public string LastName { get; set; } = string.Empty;
    public string Email { get; set; } = string.Empty;
    public CultureInfo? Culture { get; set; }
    public string? TimeZoneId { get; set; }
    public bool EmailConfirmed { get; set; }
    public Company Company { get; set; } = new();
}

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

{% hint style="info" %} Your class can be anything that is serializable by your chosen serializer. {% endhint %}