Beispiel #1
0
        public virtual async Task Create(SoftCreateInput input)
        {
            var item = input.MapTo <Soft>();

            //自动生成appid,appsecret
            item.AppId     = "ns" + MD5Helper.EnCode16Bit(DateTime.Now.ToString()).ToLower();
            item.AppSecret = MD5Helper.EnCode(RandExtension.GetRandomNum()).ToLower();
            item.IsActive  = true;//默认启用
            var entity = await _softRepository.InsertAsync(item);
        }