design the interface
Posted
by hotyi
on Stack Overflow
See other posts from Stack Overflow
or by hotyi
Published on 2010-05-02T01:50:32Z
Indexed on
2010/05/02
1:57 UTC
Read the original article
Hit count: 349
i want to design an interface has the function to do mapping from Entity object to Form object
public interface IFormToEntityMapper
{
TEntity Map(TForm tForm);
}
and vise versa.
public interface IEntityToFormMapper
{
TForm Map(TEntity tEntity);
}
i have the question if i should define these two functions in one interface and seperate them to different interface. if i put them into one interface, does that violate the SRP?
© Stack Overflow or respective owner