Beispiel #1
0
        public JsonEntity CreateNewUser(IMitraisEntity mitraisEntity, UserDTO model)
        {
            JsonEntity _json = new JsonEntity();

            try
            {
                MD_User new_user = new MD_User()
                {
                    phone      = model.Phone,
                    dob        = (model.Dob == null) ? String.Empty : model.Dob,
                    first_name = model.First_Name,
                    last_name  = model.Last_Name,
                    gender     = model.Gender,
                    email      = model.Email
                };

                user_repo.Insert(mitraisEntity, "ID", new_user);

                _json.AddSuccessData("Successfully added new user");
            }
            catch (Exception ex)
            {
                _json.AddExceptionAlert(ex);
            }
            return(_json);
        }