/// <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); }
/// <summary> /// 创建模型 /// </summary> /// <param name="model"></param> /// <returns></returns> public async Task CreateModel(ModelDto model) { await _modelRepository.InsertAsync(model.MapTo <Core.Entities.Model>()); }