Asp.net Core 源码-SessionExtensions

using Microsoft.AspNetCore.Http;
using Newtonsoft.Json;

namespace SportsStore.Infrastructure {

    public static class SessionExtensions {

        public static void SetJson(this ISession session, string key, object value) {
            session.SetString(key, JsonConvert.SerializeObject(value));
        }

        public static T GetJson<T>(this ISession session, string key) {
            var sessionData = session.GetString(key);
            return sessionData == null
                 ? default(T) : JsonConvert.DeserializeObject<T>(sessionData);
        }
    }
}

 

转载于:https://www.cnblogs.com/YrRoom/p/11070223.html

nopCommerce 是一个由ASP.NET多层模式开发的开源电子商城系统,可以自行设置模板、配置灵活、功能强大,它内含一个目录前端和一个管理工具后端。前端包括用户注册、商品购买(可以进行评论)、投票、Blog等,后端有类别管理、产品管理、客户及角色管理、订单管理、纳税管理、国家(地区管理)、邮件发送、消息模板、新闻发布、blog管理,可以对列表数据进行XML导出。 Highlight features Architecture improvements Moved to ASP.NET MVC 3.0 (Razor syntax) Really pluggable architecture (just drop a plugin to the /plugins folder in your nopCommerce directory) SQL Server Compact support Code-First Development with Entity Framework 4 (data access) More flexible ACL implementation More user-friendly admin area Added unit tests   Improvements Performance optimization reCAPTCHA integration New tier prices implementation (now can be configured based on customer roles) Several discount requirements can be configured per discount Allow store owner to create a new purchased gift card without placing an order Some of existing discount requirements didn't work for guests Search for customers by name in administration Merged product reviews and ratings options. Email wishlist to a friend Admin area. Show operation status after it's completed (Save, Delete buttons) New installation wizard (The orchard project contribution) Simplified register page. Removed a lot of fields that were not used at all. Fill the "EstimateShipping" module on load with the country/region/zipcode of the current customer Allow store owner to manage the number of product tags that appear in the tag cloud Removed warehouses and pricelists features because they were useless A lot of refactoring and other improvements   Bugs Tax rounding issue fixed Some shipping issues fixed Download catalog as PDF. Currency values had 4 decimal places Select payment/shipping method radio button text was not clickable Hide prices for non-registered customers didn't work on tier prices Renamed PayPal PTI to PDT MS Excel importing issue fixed A lot of other bugs fixes
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值