IEntityRepository
This EntityRepo class contains the Persistnece Logic that is not covered by the GenericRepository.
Following Sample project does not use the GenericRepo but it sould be in the project to encapsulate the General CRUD logic need by Every Entity.
=============================
using System.Collections.Generic;
using GigHub.Core.Models;
namespace GigHub.Core.Repositories
{
public interface IGigRepository
{
Gig GetGig(int gigId);
IEnumerable<Gig> GetUpcomingGigsByArtist(string artistId);
Gig GetGigWithAttendees(int gigId);
IEnumerable<Gig> GetGigsUserAttending(string userId);
void Add(Gig gig);
IEnumerable<Gig> GetUpcomingGigs(string searchTerm = null);
}
}
=======================================
using GigHub.Core.Models;
namespace GigHub.Core.Repositories
{
public interface IFollowingRepository
{
Following GetFollowing(string followerId, string followeeId);
void Add(Following following);
void Remove(Following following);
}
}
Following Sample project does not use the GenericRepo but it sould be in the project to encapsulate the General CRUD logic need by Every Entity.
=============================
using System.Collections.Generic;
using GigHub.Core.Models;
namespace GigHub.Core.Repositories
{
public interface IGigRepository
{
Gig GetGig(int gigId);
IEnumerable<Gig> GetUpcomingGigsByArtist(string artistId);
Gig GetGigWithAttendees(int gigId);
IEnumerable<Gig> GetGigsUserAttending(string userId);
void Add(Gig gig);
IEnumerable<Gig> GetUpcomingGigs(string searchTerm = null);
}
}
=======================================
using GigHub.Core.Models;
namespace GigHub.Core.Repositories
{
public interface IFollowingRepository
{
Following GetFollowing(string followerId, string followeeId);
void Add(Following following);
void Remove(Following following);
}
}
Comments
Post a Comment