Пример #1
0
 public static void SetInt32(this IResponseCookies cookies, string key, int value, int days = 30) =>
 cookies.SetString(key, value.ToString(), days);
Пример #2
0
 public static void SetObject <T>(this IResponseCookies cookies, string key, T value, int days = 30) =>
 cookies.SetString(key, JsonConvert.SerializeObject(value), days);
Пример #3
0
 public static void SetRecord(this IResponseCookies cookie, string name, Record value)
 {
     cookie.SetString(name, value?.ToString() ?? "");
 }