Answers for "params Expression<Func<T, object>>[] includeProperties"

0

params Expression<Func<T, object>>[] includeProperties

public TEntity GetById(Guid id, params Expression<Func<TEntity, object>>[] includeProperties)
    {
        if (id == Guid.Empty) return null;

        var set = _unitOfWork.CreateSet<TEntity>();
        foreach(var includeProperty in includeProperties)
        {
             set.Include(includeProperty);
        }
        return set.First(i => i.Id == id);
    }
Posted by: Guest on May-05-2021

Code answers related to "params Expression<Func<T, object>>[] includeProperties"

Code answers related to "Javascript"

Browse Popular Code Answers by Language