This question is locked. New answers and comments are not allowed.
Hi,
I am using Fluent mapping to map my database tables. As others said I generated the code with FluentModel withard. What I want is to fire added event when new instance child element created and parent set to one of the existing object that tracked by ORM. I manually entered the IsManaged() in both sides, but couldn't make it work. Let me give you a better example:
public class Customer
{
Id,
Name,
LastName,
Contacts
}
public class Contact
{
Id,
Name,
LastName,
Customer
}
What I want to do is create a new instance of contact then assign existing customer to it.
......
Contact con = new Contact(){Id=1, Name = "Test", LastName = "Test"};
con.Customer = existingCustomer;//this Customer is tracked by Telerik ORM
......
After assigning existing customer to the contact ORM is not firing Added event.
What I want is that Added event fired. Is it possible?
Thanks,
I am using Fluent mapping to map my database tables. As others said I generated the code with FluentModel withard. What I want is to fire added event when new instance child element created and parent set to one of the existing object that tracked by ORM. I manually entered the IsManaged() in both sides, but couldn't make it work. Let me give you a better example:
public class Customer
{
Id,
Name,
LastName,
Contacts
}
public class Contact
{
Id,
Name,
LastName,
Customer
}
What I want to do is create a new instance of contact then assign existing customer to it.
......
Contact con = new Contact(){Id=1, Name = "Test", LastName = "Test"};
con.Customer = existingCustomer;//this Customer is tracked by Telerik ORM
......
After assigning existing customer to the contact ORM is not firing Added event.
What I want is that Added event fired. Is it possible?
Thanks,