public bool CreateReport(int eventId, EventReportType reportType, string hostname, string notes, int?versionNumber) { ParamIs.NotNull(() => hostname); ParamIs.NotNull(() => notes); return(HandleTransaction(ctx => { return new Model.Service.Queries.EntryReportQueries().CreateReport(ctx, PermissionContext, entryLinkFactory, report => report.Entry.Id == eventId, (song, reporter, notesTruncated) => new EventReport(song, reportType, reporter, hostname, notesTruncated, versionNumber), () => reportType != EventReportType.Other ? enumTranslations.Translation(reportType) : null, eventId, reportType, hostname, notes); })); }
public void PostReport(int eventId, EventReportType reportType, string notes, int?versionNumber) => queries.CreateReport(eventId, reportType, WebHelper.GetRealHost(Request), notes ?? string.Empty, versionNumber);