NEW: IResponseRepository and finish renaming
This commit is contained in:
parent
95724393ea
commit
e45fce2e65
15
Server/Repository/IResponseRepository.cs
Normal file
15
Server/Repository/IResponseRepository.cs
Normal file
@ -0,0 +1,15 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SZUAbsolventenverein.Module.EventRegistration.Repository
|
||||
{
|
||||
public interface IResponseRepository
|
||||
{
|
||||
IEnumerable<Models.Response> GetResponses(int ModuleId);
|
||||
Models.Response GetResponse(int EventRegistrationId);
|
||||
Models.Response GetResponse(int EventRegistrationId, bool tracking);
|
||||
Models.Response AddResponse(Models.Event EventRegistration);
|
||||
Models.Response UpdateResponse(Models.Event EventRegistration);
|
||||
void DeleteResponse(int EventRegistrationId);
|
||||
}
|
||||
}
|
@ -33,7 +33,7 @@ namespace SZUAbsolventenverein.Module.EventRegistration.Services
|
||||
{
|
||||
if (_userPermissions.IsAuthorized(_accessor.HttpContext.User, _alias.SiteId, EntityNames.Module, NewEvent.ModuleId, PermissionNames.Edit))
|
||||
{
|
||||
NewEvent = _EventRegistrationRepository.AddEventRegistration(NewEvent);
|
||||
NewEvent = _EventRegistrationRepository.AddEvent(NewEvent);
|
||||
_logger.Log(LogLevel.Information, this, LogFunction.Create, "EventRegistration Added {NewEvent}", NewEvent);
|
||||
}
|
||||
else
|
||||
@ -53,7 +53,7 @@ namespace SZUAbsolventenverein.Module.EventRegistration.Services
|
||||
{
|
||||
if (_userPermissions.IsAuthorized(_accessor.HttpContext.User, _alias.SiteId, EntityNames.Module, ModuleId, PermissionNames.Edit))
|
||||
{
|
||||
_EventRegistrationRepository.DeleteEventRegistration(EventId);
|
||||
_EventRegistrationRepository.DeleteEvent(EventId);
|
||||
_logger.Log(LogLevel.Information, this, LogFunction.Delete, "EventRegistration Deleted {EventId}", EventId);
|
||||
}
|
||||
else
|
||||
@ -77,7 +77,7 @@ namespace SZUAbsolventenverein.Module.EventRegistration.Services
|
||||
{
|
||||
if (_userPermissions.IsAuthorized(_accessor.HttpContext.User, _alias.SiteId, EntityNames.Module, ModuleId, PermissionNames.View))
|
||||
{
|
||||
return Task.FromResult(_EventRegistrationRepository.GetEventRegistrations(ModuleId).ToList());
|
||||
return Task.FromResult(_EventRegistrationRepository.GetEvents(ModuleId).ToList());
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -90,7 +90,7 @@ namespace SZUAbsolventenverein.Module.EventRegistration.Services
|
||||
{
|
||||
if (_userPermissions.IsAuthorized(_accessor.HttpContext.User, _alias.SiteId, EntityNames.Module, NewEvent.ModuleId, PermissionNames.Edit))
|
||||
{
|
||||
NewEvent = _EventRegistrationRepository.UpdateEventRegistration(NewEvent);
|
||||
NewEvent = _EventRegistrationRepository.UpdateEvent(NewEvent);
|
||||
_logger.Log(LogLevel.Information, this, LogFunction.Update, "EventRegistration Updated {NewEvent}", NewEvent);
|
||||
}
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user