O'Reilly logo

Applied ASP.NET 4 in Context by Adam Freeman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating and Implementing the Repository

Now that we have defined the domain model classes, we can move on to the repository. I have added the folder Models/Domain/Repository in which I created a new interface, IRepository, shown in Listing 31-6.

Listing 31-6. The IRepository interface

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

I have ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required