Fix update agent name error
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
using Managing.Application.Abstractions.Repositories;
|
||||
using Managing.Domain.Statistics;
|
||||
using Managing.Infrastructure.Databases.PostgreSql;
|
||||
using Managing.Infrastructure.Databases.PostgreSql.Entities;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using static Managing.Common.Enums;
|
||||
|
||||
namespace Managing.Infrastructure.Database.PostgreSql;
|
||||
namespace Managing.Infrastructure.Databases.PostgreSql;
|
||||
|
||||
public class AgentSummaryRepository : IAgentSummaryRepository
|
||||
{
|
||||
@@ -310,6 +309,7 @@ public class AgentSummaryRepository : IAgentSummaryRepository
|
||||
public async Task UpdateAgentNameAsync(int userId, string agentName)
|
||||
{
|
||||
var entity = await _context.AgentSummaries
|
||||
.AsNoTracking()
|
||||
.FirstOrDefaultAsync(a => a.UserId == userId);
|
||||
|
||||
if (entity != null)
|
||||
@@ -338,6 +338,7 @@ public class AgentSummaryRepository : IAgentSummaryRepository
|
||||
public async Task IncrementBacktestCountAsync(int userId)
|
||||
{
|
||||
var entity = await _context.AgentSummaries
|
||||
.AsNoTracking()
|
||||
.FirstOrDefaultAsync(a => a.UserId == userId);
|
||||
|
||||
if (entity != null)
|
||||
|
||||
Reference in New Issue
Block a user