public void AddComment(Bug bug) { var workItemDao = new WorkItemDao { Id = bug.Id, Description = bug.Description, }; var workItemSql = OperationsHelper.BuildUpdateStatement(workItemDao.GetTableName(), nameof(workItemDao.Id), nameof(workItemDao.Description)); AddChange(workItemSql, workItemDao, OperationType.UPDATE); var bugDao = new BugDao { Id = bug.Id, IntegratedInBuild = bug.IntegratedInBuild, FoundInBuild = bug.FoundInBuild, SystemInfo = bug.SystemInfo }; var bugSql = OperationsHelper.BuildUpdateStatement(bugDao.GetTableName(), nameof(bug.Id), nameof(bugDao.IntegratedInBuild), nameof(bugDao.FoundInBuild), nameof(bugDao.SystemInfo)); AddChange(bugSql, bugDao, OperationType.UPDATE); }
public void ChangeState(Bug bug) { var workItemDao = new WorkItemDao { Id = bug.Id, StateId = (int)bug.State, StateReasonId = (int)bug.StateReason, }; workItemDao.IncludeDomainEvents(bug.DomainEvents); var workItemSql = OperationsHelper.BuildUpdateStatement(workItemDao.GetTableName(), nameof(workItemDao.Id), nameof(workItemDao.StateId), nameof(workItemDao.StateReasonId)); AddChange(workItemSql, workItemDao, OperationType.UPDATE); }
public void ModifyPlanning(Bug bug) { var workItemDao = new WorkItemDao { Id = bug.Id, PriorityId = (int)bug.Priority, }; var workItemSql = OperationsHelper.BuildUpdateStatement(workItemDao.GetTableName(), nameof(workItemDao.Id), nameof(workItemDao.PriorityId)); AddChange(workItemSql, workItemDao, OperationType.UPDATE); var bugDao = new BugDao(bug); var bugSql = OperationsHelper.BuildUpdateStatement(bugDao.GetTableName(), nameof(bug.Id), nameof(bugDao.StoryPoints), nameof(bugDao.SeverityId), nameof(bugDao.ActivityId)); AddChange(bugSql, bugDao, OperationType.UPDATE); }