Example #1
0
File: Boot.cs Project: yobur/KuRuMi
        public void TestMethod()
        {
            //IIocManager ioc = new IocManager();
            //var s = ioc.Resolve<CostomRepositoryImpl>();
            UserRepositoryImpl s = new UserRepositoryImpl();
            Sys_UserDTO        u = new Sys_UserDTO();

            u.Id       = Guid.NewGuid();
            u.userName = "******";
            u.passWord = "******";
            u.email    = "*****@*****.**";
            MapperConfigurationImpl ip = new MapperConfigurationImpl();
            var z = Mapper.Map <Sys_UserDTO, Sys_User>(u);

            s.Add(z);
            UnitExtension.Log("添加成功");
        }
Example #2
0
        /// <summary>
        /// 用户注册
        /// </summary>
        /// <param name="dto"></param>
        public void UserRegist(Sys_UserDTO dto)
        {
            var entity = Mapper.Map <Sys_UserDTO, Sys_User>(dto);

            user.Add(entity);
        }