Thank you for visiting our Partner Zone. This area is an exclusive space for MYOB Partners. Find out how to Partner with MYOB.
Thank you for visiting our Partner Zone. This area is an exclusive space for MYOB Partners. Find out how to Partner with MYOB.
Thank you for visiting our Partner Zone. This area is an exclusive space for MYOB Partners. Find out how to Partner with MYOB.
October
October
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(); } }