// Default contructor that set entity to field public TaskHistoryModel(TaskHistory taskhistory) { this._task_history = taskhistory; this._id = taskhistory.Id; this._user_id = taskhistory.UserId; this._created_date = taskhistory.CreatedDate; this._task_id = taskhistory.TaskId; this._content = taskhistory.Content; this._originalTaskHistory = taskhistory.DeepClone(); }
// Delete a existed TaskHistory public void DeleteTaskHistory(TaskHistory _taskHistory) { unitOfWork.Delete<TaskHistory>(_taskHistory); }
// Add a new TaskHistory public TaskHistory AddTaskHistory(TaskHistory _taskHistory) { unitOfWork.Add<TaskHistory>(_taskHistory); return _taskHistory; }
// Update a existed TaskHistory public TaskHistory UpdateTaskHistory(TaskHistory _taskHistory) { unitOfWork.Update<TaskHistory>(_taskHistory); return _taskHistory; }
// Refresh an existed TaskHistory public TaskHistory RefeshTaskHistory(TaskHistory _taskHistory) { unitOfWork.Refresh<TaskHistory>(_taskHistory); return _taskHistory; }
/// <summary> /// Deprecated Method for adding a new object to the TaskHistories EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToTaskHistories(TaskHistory taskHistory) { base.AddObject("TaskHistories", taskHistory); }
/// <summary> /// Create a new TaskHistory object. /// </summary> /// <param name="id">Initial value of the Id property.</param> /// <param name="userId">Initial value of the UserId property.</param> /// <param name="taskId">Initial value of the TaskId property.</param> public static TaskHistory CreateTaskHistory(global::System.Guid id, global::System.Guid userId, global::System.Guid taskId) { TaskHistory taskHistory = new TaskHistory(); taskHistory.Id = id; taskHistory.UserId = userId; taskHistory.TaskId = taskId; return taskHistory; }
// Default contructor public TaskHistoryModel() { this.IsNewItem = true; this._task_history = new TaskHistory(); }