ping on map feature complete

This commit is contained in:
Michele 2021-02-09 17:13:52 +00:00
parent 17cce56866
commit bce97de302
19 changed files with 1002 additions and 233 deletions

View file

@ -0,0 +1,28 @@
// using MediatR;
// using Sledgemapper.Api.Data;
// using System.Threading;
// using System.Threading.Tasks;
// using Sledgemapper.Api.Notifications;
// using System.Linq;
// namespace Sledgemapper.Api.Commands
// {
// public class PingCommandHandler : IRequestHandler<PingCommand, bool>
// {
// private readonly MyDbContext _dbcontext;
// private readonly IMediator _mediator;
// public PingCommandHandler(IMediator mediator, MyDbContext dbcontext) { _dbcontext = dbcontext; _mediator = mediator; }
// public async Task<bool> Handle(PingCommand notification, CancellationToken cancellationToken)
// {
// var session = _dbcontext.Sessions.First(m => m.SessionName == notification.SessionName);
// await _mediator.Publish(new PingNotification(session, notification.Location, notification.UserId));
// return true;
// }
// }
// }