Replies: 1 comment
-
Try this way, write code in Repository.cs ==> MyDeleteHandler private class MyDeleteHandler : DeleteRequestHandler<MyRow>
{
protected override void OnBeforeDelete()
{
base.OnBeforeDelete();
/* list products by CategoryID */
var products = this.UnitOfWork.Connection.List<Entities.ProductRow>(new Criteria(Entities.ProductRow.Fields.CategoryID) == (int)Row.CategoryID);
foreach (var prodRow in products)
{
this.UnitOfWork.Connection.DeleteById<Entities.ProductRow>(prodRow.ProductID);
}
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
i want the function of delete to cheack if used the id of that rcords in inother table then delte it also from that recored
public DeleteResponse Delete(IUnitOfWork uow, DeleteRequest request)
{
var n = request.EntityId;
}
how can i do that
Beta Was this translation helpful? Give feedback.
All reactions