public HttpResponseMessage RegisterAccount(string account, string password, string name)
        {
            Provider provider = this._iProviderService.Where(o => o.Account == account).FirstOrDefault();
            if (provider != null) return JsonHelp.GetJsonContent(0, "此账户已经被注册");

            UserInfo userinfo = this._iUserInfoService.Where(o => o.Account == account).FirstOrDefault();
            if (userinfo != null) return JsonHelp.GetJsonContent(0, "此账户已经被注册");

            Provider newProvider = new Provider
            {
                ProviderId = Guid.NewGuid(),
                Name = name,
                RegisterTime = DateTime.Now,
                Account = account,
                SubTime = DateTime.Now,
                Password = password
            };

            // 缓存
            this._RedisCache.Set(account, Mapper.Map<DataProvider>(newProvider));

            return this._iProviderService.CreatAccount(newProvider)
                ? JsonHelp.GetJsonContent(200, "已经成功注册")
                : JsonHelp.GetJsonContent(0, "注册失败");
        }
 public bool CreatAccount(Provider provider)
 {
     return this.Add(provider);
 }