public IOperationResult DeleteRepeatType(RepeatType repeatType) { Result.Reset(); Result = repeatTypeContext.Delete(repeatType); if (Result.IsError) { Result = repeatTypeContext.Result; Result.CustomMessage = "There was a problem deleting the requested RepeatType"; } return Result; }
/* ----- Public Methods ----- */ public IOperationResult Create(RepeatType repeatType) { ResetError(); try { _UnitOfWork.db.Insert("RepeatType", "TypeID", repeatType); _IOperationResult.RecordID = repeatType.TypeID; } catch (Exception ex) { Result = new DBOperationResult(ex); } return Result; }
public IOperationResult Delete(RepeatType repeatType) { ResetError(); try { _UnitOfWork.db.Delete(repeatType); //_UnitOfWork.db.Execute("DELETE FROM [dbo].[RepeatType] WHERE TypeID = @0", repeatTypeID); } catch (Exception ex) { Result = new DBOperationResult(ex); } return Result; }