Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "potatoboro"

Hi,

I got "The DELETE statement conflicted with the REFERENCE constraint...." error when using Unit of Work Delete(TPrimaryKey id) function for my parent child data/table. The id that I passed in into the delete function is the parent id.

I understand that this is due to I tried to delete the parent without deleting the children. What is the correct way to do this?

I had also tried to use Delete(TEntity entity) and supply the entity with the parent object (children included), but still no luck.

var parentObj= _parentRepository.Get(parentId);
_parentRepository.Delete(parentObj);
Showing 1 to 1 of 1 entries