Start a new topic
Solved

Exceptions in MemberRepositoryBase.cs

Every time I create an order (after selecting the payment method), I get an exception twice. It does not show on the frontend, I only see it when debugging the admin app.


It fires at the query.ToArray() in the following code:

 

public virtual MemberDataEntity[] GetMembersByIds(string[] ids, string[] memberTypes = null)
        {
            var query = Members.Include(x => x.MemberRelations.Select(y => y.Ancestor))
                                .Where(x => ids.Contains(x.Id));
            if(!memberTypes.IsNullOrEmpty())
            {
                query = query.Where(x => memberTypes.Contains(x.MemberType));
            }

            var retVal = query.ToArray();

            var notes = Notes.Where(x => ids.Contains(x.MemberId)).ToArray();
            var emails = Emails.Where(x => ids.Contains(x.MemberId)).ToArray();
            var addresses = Addresses.Where(x => ids.Contains(x.MemberId)).ToArray();
            var phones = Phones.Where(x => ids.Contains(x.MemberId)).ToArray();

            return retVal;
        }

 The exception says:

   ved System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)

   ved System.Data.Entity.Core.Objects.Internal.ObjectQueryExecutionPlan.Execute[TResultType](ObjectContext context, ObjectParameterCollection parameterValues)

   ved System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess)

   ved System.Data.Entity.Core.Objects.ObjectQuery`1.<>c__DisplayClass7.<GetResults>b__5()

   ved System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation)

   ved System.Data.Entity.Core.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)

   ved System.Data.Entity.Core.Objects.ObjectQuery`1.<System.Collections.Generic.IEnumerable<T>.GetEnumerator>b__0()

   ved System.Data.Entity.Internal.LazyEnumerator`1.MoveNext()

   ved System.Linq.Buffer`1..ctor(IEnumerable`1 source)

   ved System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)

   ved VirtoCommerce.CustomerModule.Data.Repositories.MemberRepositoryBase.GetMembersByIds(String[] ids, String[] memberTypes) i D:\Dev\Apps\VirtoModules\PLATFORM\Modules\Customer\VirtoCommerce.CustomerModule.Data\Repositories\MemberRepositoryBase.cs:linje 133

   ved VirtoCommerce.CustomerModule.Data.Services.MemberServiceBase.GetByIds(String[] memberIds, String[] memberTypes) i D:\Dev\Apps\VirtoModules\PLATFORM\Modules\Customer\VirtoCommerce.CustomerModule.Data\Services\MemberServiceBase.cs:linje 54

   ved VirtoCommerce.CustomerModule.Data.Services.CommerceMembersServiceImpl.GetByIds(String[] memberIds, String[] memberTypes) i D:\Dev\Apps\VirtoModules\PLATFORM\Modules\Customer\VirtoCommerce.CustomerModule.Data\Services\CommerceMembersServiceImpl.cs:linje 58

   ved VirtoCommerce.CustomerModule.Data.Services.MemberServiceDecorator.<>c__DisplayClass7_0.<GetByIds>b__0(MemberTypeMappingConfig x) i D:\Dev\Apps\VirtoModules\PLATFORM\Modules\Customer\VirtoCommerce.CustomerModule.Data\Services\MemberServiceDecorator.cs:linje 125

   ved System.Threading.Tasks.Parallel.<>c__DisplayClass17_0`1.<ForWorker>b__1()


With inner message:

Invalid object name 'dbo.Supplier'.


And I have no "Supplier" table in my database. My installation is local deploy of the modules repository v.2.10.1407


:Sigve



Yes. Disabling that module removed the exceptions.

You do not have installed example module 'MemberExtensionSampleModule'? 

Login or Signup to post a comment