Skip to content
Discussion options

You must be logged in to vote

Hi. That's a bug. The for deletion marked child should still know it's parent.
I can reproduce this issue with this code:

using Csla;
using Csla.Configuration;
using Csla.Serialization;
using Microsoft.Extensions.DependencyInjection;

using var sp = new ServiceCollection()
    .AddCsla()
    .BuildServiceProvider();

var rootPortal = sp.GetRequiredService<IDataPortal<Root>>();

var root = await rootPortal.FetchAsync();
//root.Delete();

root.Childs.RemoveAt(0);

//var formatter = SerializationFormatterFactory.GetFormatter(sp.GetRequiredService<ApplicationContext>()); // CSLA 8.X
var formatter = sp.GetRequiredService<ISerializationFormatter>(); // CSLA 9.x+

var data = formatter.Serialize(r…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by ajohnstone-ks
Comment options

You must be logged in to vote
1 reply
@ajohnstone-ks
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants