public OperationResult Delete(int Id) { var model = EduTypes.FirstOrDefault(t => t.Id == Id); model.IsDeleted = true; EduTypeRepository.Update(model); return(new OperationResult(OperationResultType.Success, "删除成功")); }
public OperationResult Update(EduTypeModel model) { var entity = EduTypes.First(t => t.Id == model.Id); entity.Name = model.Name; entity.Description = model.Description; entity.OrderSort = model.OrderSort; entity.Enabled = model.Enabled; entity.ModifyId = model.ModifyId; entity.ModifyBy = model.ModifyBy; entity.ModifyTime = model.ModifyTime; EduTypeRepository.Update(entity); return(new OperationResult(OperationResultType.Success, "更新成功")); }