Hi,
Sorry but this was not solved yet :-( It seems at first sight because it's actually working fine in de entity framework seed. From within the application layer, it's not! :shock:
What do you guys need from me to solve this?
by debugging EF I can tell EF is not registering a change after adding a user to an entity group. I tested this with intelli trace and with:
public BIDbContext(string nameOrConnectionString)
: base(nameOrConnectionString)
{
this.Database.Log = s => System.Diagnostics.Debug.WriteLine(s);
}
As you can see it is adding the reports but no go for the users :!: :
UPDATE [dbo].[ContentGroups]
SET [Purpose] = @0, [DataOwner] = NULL, [SiteId] = @1, [Description] = @2, [IsDeleted] = @3, [DeleterUserId] = NULL, [DeletionTime] = NULL, [LastModificationTime] = @4, [LastModifierUserId] = @5, [CreationTime] = @6, [CreatorUserId] = NULL
WHERE ([Id] = @7)
-- @0: 'First testing of crud operations' (Type = String, Size = 255)
-- @1: '1' (Type = Int32)
-- @2: 'General First ContentGroups 5' (Type = String, Size = 255)
-- @3: 'False' (Type = Boolean)
-- @4: '7/1/2016 2:48:54 PM' (Type = DateTime2)
-- @5: '2' (Type = Int64)
-- @6: '6/20/2016 10:37:33 AM' (Type = DateTime2)
-- @7: '1' (Type = Int32)
-- Executing asynchronously at 7/1/2016 4:48:54 PM +02:00
-- Completed in 1 ms with result: 1
INSERT [dbo].[ReportContentGroups]([Report_Id], [ContentGroup_Id])
VALUES (@0, @1)
-- @0: '3' (Type = Int32)
-- @1: '1' (Type = Int32)
-- Executing asynchronously at 7/1/2016 4:48:54 PM +02:00
-- Completed in 1 ms with result: 1
INSERT [dbo].[ReportContentGroups]([Report_Id], [ContentGroup_Id])
VALUES (@0, @1)
-- @0: '4' (Type = Int32)
-- @1: '1' (Type = Int32)
-- Executing asynchronously at 7/1/2016 4:48:54 PM +02:00
-- Completed in 0 ms with result: 1
Closed connection at 7/1/2016 4:48:54 PM +02:00
Hi,
Did a little test.
public class TestAppService : BIAppServiceBase, ITestAppService
{
private IRepository<ContentGroup> _contentRepository;
public TestAppService(IRepository<ContentGroup> contentRepository
)
{
_contentRepository = contentRepository;
}
public async Task TestIt()
{
//some plain test
//take contentgroup
var contentGroup = _contentRepository.GetAll().FirstOrDefault();
//take user
var user = await UserManager.GetUserByIdAsync(3); //known user ;-)
//add user to group
contentGroup.Users.Add(user);
//update
_contentRepository.Update(contentGroup);
//very simple - this works! What's the difference?
}
}
That worked - what's the difference? Mixing async with non async :roll:
Hi,
It is fixed. Fixed because of the update to latest version.
Thanks for all hints and tips
Hi,
When is de IRepository supporting multiple deletes (EF 6 standard funct)?
db.People.RemoveRange(db.People.Where(x => x.State == "CA"));
Thanks,
Hi,
Windows service application based on console application (with abp bootstrapper etc.) works fine on windows >8.1 but fails on windows server 2012 with error below.
Perhaps you can retrieve more info out of it. It seems to be a dependency problem? I'm not sure and if so - where can I obtain extra info.
Error from eventlog right after starting service:
Application: Intertek.BI.ApplicationService.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: Castle.MicroKernel.ComponentNotFoundException
at Castle.MicroKernel.DefaultKernel.Castle.MicroKernel.IKernelInternal.Resolve(System.Type, System.Collections.IDictionary, Castle.MicroKernel.IReleasePolicy)
at Castle.MicroKernel.DefaultKernel.Resolve(System.Type, System.Collections.IDictionary)
at Castle.Windsor.WindsorContainer.Resolve[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]
at Abp.Dependency.IocManager.Resolve[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]
at Abp.AbpKernelModule.Shutdown()
at Abp.Modules.AbpModuleManager+<>c.<ShutdownModules>b__9_0(Abp.Modules.AbpModuleInfo)
at System.Collections.Generic.List1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].ForEach(System.Action
1<System.__Canon>)
at Abp.Modules.AbpModuleManager.ShutdownModules()
at Abp.AbpBootstrapper.Dispose()
at Intertek.BI.ApplicationService.ApplicationService..ctor()
Exception Info: System.Exception at Intertek.BI.ApplicationService.ApplicationService..ctor() at Intertek.BI.ApplicationService.Program.Main(System.String[])
Description: The process was terminated due to an unhandled exception. Exception Info: Castle.MicroKernel.ComponentNotFoundException
already tried solve issues with framework versions, x86/64 but with no success. I'm running ABP 0.7.5/zero 0.7.4
Not found, ok - but what compoment?
Anyone :?:
This non descriptive error came at surface due to missing third party drivers in my custom abp module.
Solved :D
Thanks anyway