Exemple #1
0
        public void UpdateData(demo dto)
        {
            demo demo = _demoRepository.GetById(dto.id);

            dto.name          = dto.name ?? string.Empty;
            dto.sex           = dto.sex ?? string.Empty;
            dto.age           = dto.age;
            dto.remark        = dto.remark ?? string.Empty;
            dto.create_person = demo.create_person ?? string.Empty;
            dto.create_time   = demo.create_time;
            _demoRepository.Update(dto);
        }
Exemple #2
0
        /// <summary>
        /// 获取Demo
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        public Demo GetDemoById(long Id)
        {
            var demoModel = _demoRepository.GetById(Id);

            return(demoModel);
        }
Exemple #3
0
        /// <summary>
        /// 获取Demo
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        public Demo GetDemoById(long Id)
        {
            Demo model = _demoRepository.GetById(Id);

            return(model);
        }