Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time

using System.Threading.Tasks;
using Events;
using Identity.Api.Services;
using MassTransit;
namespace Identity.Api.Messaging.Consumers
{
public class ApplicantAppliedEventConsumer : IConsumer<ApplicantAppliedEvent>
{
private readonly IIdentityRepository _identityRepository;
public ApplicantAppliedEventConsumer(IIdentityRepository applicantRepository)
{
_identityRepository = applicantRepository;
}
public async Task Consume(ConsumeContext<ApplicantAppliedEvent> context)
{
// increment the user's application count in the cache
await _identityRepository.UpdateUserApplicationCountAsync(context.Message.ApplicantId.ToString());
}
}
}