forked from SharpRepository/SharpRepository
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathICanAdd.cs
More file actions
26 lines (24 loc) · 848 Bytes
/
ICanAdd.cs
File metadata and controls
26 lines (24 loc) · 848 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
using System.Collections.Generic;
namespace SharpRepository.Repository.Traits
{
/// <summary>
/// Based on the Interface Segregation Principle (ISP), the
/// ICanAdd interface exposes only the "Add" methods of the
/// Repository.
/// <see cref="http://richarddingwall.name/2009/01/19/irepositoryt-one-size-does-not-fit-all/"/>
/// </summary>
/// <typeparam name="T">Generic repository entity type</typeparam>
public interface ICanAdd<in T>
{
/// <summary>
/// Adds the specified entity.
/// </summary>
/// <param name="entity">The entity.</param>
void Add(T entity);
/// <summary>
/// Adds the specified entities.
/// </summary>
/// <param name="entities">The entities.</param>
void Add(IEnumerable<T> entities);
}
}