public I Enumerable ExecWithStoreProcedure(string query, params object[] parameters) { return _co ntext.Database.SqlQuery(query, parameters); } And then you can call it with the unitofwork/repository like I Enumerable products = _unitOfWork.ProductRepository.ExecWithStoreProcedu re( "spGetProducts @ bigCategoryId", new SqlPara meter("bigCategoryId", SqlDbType.BigInt) { Value = categoryId } );