Skip to content

Commit 7e597d6

Browse files
author
gauffininteractive
committed
Corrected issue #20
1 parent ffea9cb commit 7e597d6

File tree

7 files changed

+129
-248
lines changed

7 files changed

+129
-248
lines changed

src/Server/OneTrueError.SqlServer/Analysis/ErrorReportEntityMapper.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ public class ErrorReportEntityMapper : CrudEntityMapper<ErrorReportEntity>
88
{
99
public ErrorReportEntityMapper() : base("ErrorReports")
1010
{
11+
Property(x => x.Id)
12+
.PrimaryKey(true);
13+
1114
Property(x => x.Exception)
1215
.ToPropertyValue(EntitySerializer.Deserialize<ErrorReportException>)
1316
.ToColumnValue(EntitySerializer.Serialize);

src/Server/OneTrueError.SqlServer/Core/ReportSpikes/ReportSpikesRepository.cs

Lines changed: 0 additions & 103 deletions
This file was deleted.

src/Server/OneTrueError.SqlServer/Modules/ReportSpikes/ReportSpikesRepository.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public virtual async Task<int> GetAverageReportCountAsync(int applicationId)
2727
{
2828
cmd.CommandText = @"SELECT
2929
[Day] = DATENAME(WEEKDAY, createdatutc),
30-
Totals = COUNT(*)
30+
Totals = cast (COUNT(*) as int)
3131
FROM errorreports
3232
WHERE applicationid=@appId
3333
GROUP BY
@@ -38,7 +38,7 @@ GROUP BY
3838
{
3939
while (await reader.ReadAsync())
4040
{
41-
numbers.Add((int) reader[0]);
41+
numbers.Add((int) reader[1]);
4242
}
4343
}
4444
numbers.Sort();

src/Server/OneTrueError.SqlServer/OneTrueError.SqlServer.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@
120120
<Compile Include="Core\Incidents\Queries\GetReportListResultItemMapper.cs" />
121121
<Compile Include="Core\Notifications\NotificationRepository.cs" />
122122
<Compile Include="Core\Notifications\UserNotificationSettingsMap.cs" />
123-
<Compile Include="Core\ReportSpikes\ReportSpikesRepository.cs" />
124123
<Compile Include="Core\Reports\ErrorReportDtoMapper.cs" />
125124
<Compile Include="Core\Reports\ErrorReportRepository.cs" />
126125
<Compile Include="Core\Users\ApplicationTeamMemberMapper.cs" />

0 commit comments

Comments
 (0)