arneaase/CapRaffle — Issue #28: UpdateException when deleting event
Author: khellang
Created: 2011-10-18 21:53:57+00:00
State: open

I get an UpdateException when trying to delete an event with registered participants. When I delete the participation first, then I can delete the event.

Exception details:
`System.Data.SqlClient.SqlException: The DELETE statement conflicted with the REFERENCE constraint "FK_UserEvent_Event". The conflict occurred in database "CapRaffle", table "dbo.UserEvent", column 'EventId'. The statement has been terminated.`

Source file: `CapRaffle.Domain\Implementation\EventRepository.cs` - Line: `63`

Maybe a `CASCADING DELETE` would fix it? :)