MYOBCommunity
Partner Zone
|
|
Partner Zone

Timesheet does not inherit from BaseEntity like other Contracts.Version2 objects - Why?

Experienced Cover User kjm
39 Posts
Experienced Cover User
Australia
kjm
Experienced Cover User

39Posts

3Kudos

2Solutions

Timesheet does not inherit from BaseEntity like other Contracts.Version2 objects - Why?

building a repository pattern in c# like which will allow be to abstract the implementation a little...found it very strange that nearly all the objects in the Contracts.Version2 namespace inherit from BaseEntity which allows me then to write the below but strangely Timesheet does not inherit from BaseEntity..why? there seems to be nothing in the BaseEntity class that would seem to be 'wrong' for a Timesheet...is this an oversight or is it intentional and if it is intentional then why?

 

 

 public class Repository<T> : IRepository<T> where T : BaseEntity
    {
        public virtual IQueryable<T> SearchFor(Expression<Func<T, bool>> predicate)
        {
            throw new NotImplementedException();
        }

        public IQueryable<T> GetAll()
        {
            throw new NotImplementedException();
        }

        public T GetById(int id)
        {
            throw new NotImplementedException();
        }
    }

 

baseentity.jpg
Didn't find your answer here?
Try using advanced search to find a post more easily Advanced Search
or
Get the conversation started and make a new post Start a Post