示例#1
0
        /// <summary>
        /// 修改模型
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public async Task UpdateModel(ModelDto model)
        {
            var cModel = await _modelRepository.GetAsync(model.Id);

            model.MapTo(cModel);
            await _modelRepository.UpdateAsync(cModel);
        }
示例#2
0
 /// <summary>
 /// 创建模型
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public async Task CreateModel(ModelDto model)
 {
     await _modelRepository.InsertAsync(model.MapTo <Core.Entities.Model>());
 }