public OperationResult Delete(int DictionaryValue) { var model = SYS_DICTIONARYList.FirstOrDefault(t => t.DictionaryValue == DictionaryValue); SYS_DICTIONARYRepository.Delete(model); return(new OperationResult(OperationResultType.Success, "successfully deleted")); }
public OperationResult Update(UpdateSYS_DICTIONARYModel model) { var entity = SYS_DICTIONARYList.First(t => t.DictionaryValue == model.DictionaryValue); entity.DictionaryName = model.DictionaryName; entity.DictionaryValue = model.DictionaryValue; entity.Remark = model.Remark; SYS_DICTIONARYRepository.Update(entity); return(new OperationResult(OperationResultType.Success, "update completed")); }
public OperationResult Insert(SYS_DICTIONARYModel model) { var entity = new SYS_DICTIONARY { DictionaryName = model.DictionaryName, DictionaryValue = model.DictionaryValue, Remark = model.Remark, }; SYS_DICTIONARYRepository.Insert(entity); return(new OperationResult(OperationResultType.Success, "Added successfully")); }