Building the Delete Feature

Before we can implement a delete action, we will have to update the repository so that it supports deleting event objects. Listing 31-31 shows the modifications required for the IRepository interface.

Listing 31-31. Adding a delete method to the IRepository interface

using System.Collections.Generic; namespace TriathlonApp.Models.Domain.Repository {     public interface IRepository {         IEnumerable<Event> Events { get; }         void SaveEvent(Event ev);         void DeleteEvent(Event ev);         IEnumerable<EventType> EventTypes { get; }         IEnumerable<ReferenceTime> ReferenceTimes { get; }         IEnumerable<Athlete> Athletes { get; }         RankingSet GetPersonalRank(Event ev);         RankingSet ...

Get Applied ASP.NET 4 in Context now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.