public Task <string> Save(ProfileSaveModel profile, CancellationToken cancellationToken) { var email = this.User.GetEmailAddress(); return(this.mediator.Send(new SaveProfile(email, MapClub.Map(email, profile)), cancellationToken)); }
public async Task <Entrant> PutEntrant(ulong eventId, ulong entrantId, EntrantSaveModel entrantSaveModel, CancellationToken cancellationToken) { var currentUserEmail = this.User.GetEmailAddress(); if (await this.mediator.Send(new IsClubAdmin(eventId, currentUserEmail), cancellationToken)) { return(await this.mediator.Send(new SaveEntrant(MapClub.Map(entrantId, eventId, entrantSaveModel, entrantSaveModel.Email)), cancellationToken)); } else { return(await this.mediator.Send(new SaveEntrant(MapClub.Map(entrantId, eventId, entrantSaveModel, currentUserEmail)), cancellationToken)); } }
public Task <ulong> Save(ulong eventId, EventSaveModel @event, CancellationToken cancellationToken) => this.mediator.Send(new SaveEvent(MapClub.Map(eventId, @event)), cancellationToken);
public Task Add(ulong notificationId, ulong eventId, NotificationSaveModel notification, CancellationToken cancellationToken) { var email = this.User.GetEmailAddress(); return(mediator.Send(new AddNotification(MapClub.Map(notificationId, eventId, email, notification)), cancellationToken)); }
public Task <ulong> Save(ulong clubId, ClubSaveModel club, CancellationToken cancellationToken) => this.mediator.Send(new SaveClub(MapClub.Map(clubId, club)), cancellationToken);