public string OnUserCreate(string args)
        {
            var Input   = JsonConvert.DeserializeObject<UserCreateInput>(args);
            var Result  = new UserCreateOutput();

            if(!DbHolding.User.IsExist(Input.UserName))
            {
                var user = new User()
                {
                    nickname    = Input.UserName,
                    pass        = Input.UserPass,
                };
                var id = DbHolding.User.Create(user);

                Result.ResultStatus = ResultStatus.SuccessStatus;
                Result.UserId       = id;
            }

            var Output = JsonConvert.SerializeObject(Result);
            return Output;
        }
Exemple #2
0
 public bool Update(User obj)
 {
     return col.Update(obj.id, obj);
 }
Exemple #3
0
 public int Create(User obj)
 {
     var r = col.Insert(obj);
     return r.AsInt32;
 }