class Car
{
public Int32 Id { get; set; }
public String Name { get; set; }
}
static void Main(string[] args)
{
RedisClient client = new RedisClient("127.0.0.1", 6379);
client.FlushAll();
client.ChangeDb(0);
var IRCar = client.As();
IRCar.DeleteAll();
var c1 = new Car()
{
Id=1,
Name="东风标致408"
};
IRCar.Store(c1);
List list = new List();
list.Add(c1);
var c2 = new Car()
{
Id = 2,
Name = "东风标致508"
};
list.Add(c2);
var c3 = new Car()
{
Id = 3,
Name = "东风标致308"
};
list.Add(c3);
var c4 = new Car()
{
Id = 4,
Name = "东风标致3008"
};
list.Add(c4);
IRCar.StoreAll(list);
var _list= IRCar.GetAll();
}