public OperationResult Delete(string PropertyID) { var model = SYS_PROPERTYList.FirstOrDefault(t => t.PropertyID == PropertyID); SYS_PROPERTYRepository.Delete(model); return(new OperationResult(OperationResultType.Success, "successfully deleted")); }
public OperationResult Update(UpdateSYS_PROPERTYModel model) { var entity = SYS_PROPERTYList.First(t => t.PropertyID == model.PropertyID); entity.PropertyID = model.PropertyID; entity.PropertyName = model.PropertyName; entity.Remark = model.Remark; entity.Status = model.Status; SYS_PROPERTYRepository.Update(entity); return(new OperationResult(OperationResultType.Success, "update completed")); }
public OperationResult Insert(SYS_PROPERTYModel model) { var entity = new SYS_PROPERTY { PropertyID = model.PropertyID, PropertyName = model.PropertyName, Remark = model.Remark, Status = model.Status, }; SYS_PROPERTYRepository.Insert(entity); return(new OperationResult(OperationResultType.Success, "Added successfully")); }