scm0sml
asked on
one interface implementing another
I want to have the two interfaces below.
Basically I want to control certain elements of different aspects of my website.
So some repositories will only be able to read certain classes, some read/write.
What I want though is for IWriteable to also Implement IReadable as my attitude is if something has the permission to write it is ok to read.
Using my interface above how to I make Iwritebale implement IReadabale?
public interface IWriteable<T>
where T : class
{
void Add(T newEntity);
void Remove(T entity);
}
public interface IReadable<T>
where T : class
{
IQueryable<T> FindAll();
IQueryable<T> FindWhere(Expression<Func<T, bool>> predicate);
T FindById(int id);
T FindById(Guid id);
}
Basically I want to control certain elements of different aspects of my website.
So some repositories will only be able to read certain classes, some read/write.
What I want though is for IWriteable to also Implement IReadable as my attitude is if something has the permission to write it is ok to read.
Using my interface above how to I make Iwritebale implement IReadabale?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Probably didint explain myself very well!I'd say you explained it just fine = )
Glad to help!
ASKER
Probably didint explain myself very well!