Merge branch 'develop' into work
# Conflicts: # BMA.EHR.Application/ApplicationServicesRegistration.cs # BMA.EHR.Infrastructure/Migrations/ApplicationDBContextModelSnapshot.cs # BMA.EHR.Infrastructure/Persistence/ApplicationDBContext.cs # BMA.EHR.Solution.sln
This commit is contained in:
commit
8edfbc7466
70 changed files with 21946 additions and 157 deletions
|
|
@ -1,4 +1,5 @@
|
|||
using BMA.EHR.Application.Repositories;
|
||||
using BMA.EHR.Application.Repositories.MessageQueue;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace BMA.EHR.Application
|
||||
|
|
@ -10,6 +11,7 @@ namespace BMA.EHR.Application
|
|||
services.AddTransient<PrefixRepository>();
|
||||
services.AddTransient<PlacementRepository>();
|
||||
services.AddTransient<OrganizationEmployeeRepository>();
|
||||
services.AddTransient<MessageQueueRepository>();
|
||||
|
||||
return services;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AWSSDK.S3" Version="3.7.107.1" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.8" />
|
||||
<PackageReference Include="AWSSDK.S3" Version="3.7.107.5" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.9" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.0.0" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
</ItemGroup>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,49 @@
|
|||
using BMA.EHR.Application.Common.Interfaces;
|
||||
using BMA.EHR.Domain.Models.MetaData;
|
||||
using BMA.EHR.Domain.Models.Notifications;
|
||||
using BMA.EHR.Domain.Models.Placement;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BMA.EHR.Application.Repositories.MessageQueue
|
||||
{
|
||||
public class MessageQueueRepository : GenericRepository<Guid, MessageQueueEntity>
|
||||
{
|
||||
#region " Fields "
|
||||
|
||||
private readonly IApplicationDBContext _dbContext;
|
||||
private readonly IHttpContextAccessor _httpContextAccessor;
|
||||
|
||||
#endregion
|
||||
|
||||
#region " Constructor and Destuctor "
|
||||
|
||||
public MessageQueueRepository(IApplicationDBContext dbContext, IHttpContextAccessor httpContextAccessor) : base(dbContext, httpContextAccessor)
|
||||
{
|
||||
_dbContext = dbContext;
|
||||
_httpContextAccessor = httpContextAccessor;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region " Methods "
|
||||
|
||||
public async Task<List<MessageQueueEntity>> GetUnSentAsync(int count = 10)
|
||||
{
|
||||
var data = await _dbContext.Set<MessageQueueEntity>().Where(x => !x.IsSend)
|
||||
.AsNoTracking()
|
||||
.OrderBy(m => m.CreatedAt)
|
||||
.Take(count)
|
||||
.ToListAsync();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +1,4 @@
|
|||
using BMA.EHR.Application.Common.Interfaces;
|
||||
using BMA.EHR.Domain.Models.MetaData;
|
||||
using BMA.EHR.Domain.Models.Placement;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue