Skip to content

Commit 8b085c4

Browse files
committed
Updating
1 parent 6683ed7 commit 8b085c4

File tree

6 files changed

+8
-19
lines changed

6 files changed

+8
-19
lines changed

AzureDevopsStateTracker/Adapters/WorkItemAdapter.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ public TimeByStateDTO ToTimeByStateDTO(TimeByState workItemStatusTime)
8686
return new TimeByStateDTO()
8787
{
8888
CreatedAt = workItemStatusTime.CreatedAt,
89-
UpdatedAt = workItemStatusTime.UpdatedAt,
9089
State = workItemStatusTime.State,
9190
TotalTime = ToStringTime(new DateTime(workItemStatusTime.TotalTime).TimeOfDay),
9291
TotalWorkedTime = ToStringTime(new DateTime(workItemStatusTime.TotalWorkedTime).TimeOfDay)

AzureDevopsStateTracker/Data/DataBaseConfig.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
1-
namespace AzureDevopsStateTracker.Data
1+
using AzureDevopsStateTracker.Extensions;
2+
using System;
3+
4+
namespace AzureDevopsStateTracker.Data
25
{
36
public class DataBaseConfig
47
{
58
public DataBaseConfig(string connectionsString, string schemaName = "dbo")
69
{
10+
if (connectionsString.IsNullOrEmpty())
11+
throw new ArgumentException("The ConnectionsString is required");
12+
713
ConnectionsString = connectionsString;
814
SchemaName = schemaName;
915
}

AzureDevopsStateTracker/Entities/TimeByState.cs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ namespace AzureDevopsStateTracker.Entities
55
{
66
public class TimeByState : Entity
77
{
8-
public DateTime UpdatedAt { get; private set; }
98
public string WorkItemId { get; private set; }
109
public string State { get; private set; }
1110
public long TotalTime { get; private set; }
@@ -20,18 +19,10 @@ public TimeByState(string workItemId, string state, long totalTime, long totalWo
2019
State = state;
2120
TotalTime = totalTime;
2221
TotalWorkedTime = totalWorkedTime;
23-
UpdatedAt = CreatedAt;
2422

2523
Validate();
2624
}
2725

28-
public void Update(long totalTime, long totalWorkedTime)
29-
{
30-
TotalTime = totalTime;
31-
TotalWorkedTime = totalWorkedTime;
32-
UpdatedAt = DateTime.UtcNow;
33-
}
34-
3526
public void Validate()
3627
{
3728
if (WorkItemId.IsNullOrEmpty() || Convert.ToInt64(WorkItemId) <= 0)

AzureDevopsStateTracker/Migrations/20210715224309_AzureDevopsStateTrackerInitial.Designer.cs renamed to AzureDevopsStateTracker/Migrations/20210717144104_AzureDevopsStateTrackerInitial.Designer.cs

Lines changed: 1 addition & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

AzureDevopsStateTracker/Migrations/20210715224309_AzureDevopsStateTrackerInitial.cs renamed to AzureDevopsStateTracker/Migrations/20210717144104_AzureDevopsStateTrackerInitial.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ protected override void Up(MigrationBuilder migrationBuilder)
4444
{
4545
Id = table.Column<string>(type: "varchar(200)", nullable: false),
4646
CreatedAt = table.Column<DateTime>(nullable: false),
47-
UpdatedAt = table.Column<DateTime>(nullable: false),
4847
WorkItemId = table.Column<string>(type: "varchar(200)", nullable: true),
4948
State = table.Column<string>(type: "varchar(200)", nullable: true),
5049
TotalTime = table.Column<long>(nullable: false),

AzureDevopsStateTracker/Migrations/AzureDevopsStateTrackerContextModelSnapshot.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,6 @@ protected override void BuildModel(ModelBuilder modelBuilder)
3838
b.Property<long>("TotalWorkedTime")
3939
.HasColumnType("bigint");
4040

41-
b.Property<DateTime>("UpdatedAt")
42-
.HasColumnType("datetime2");
43-
4441
b.Property<string>("WorkItemId")
4542
.HasColumnType("varchar(200)");
4643

0 commit comments

Comments
 (0)