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

Activities of "niengineering"

Question

Hi,

do you have a standard solution for the removal of referenced key? An example:

public class UM : FullAuditedEntity, IMustHaveTenant { ... } public class Article : FullAuditedEntity, IMustHaveTenant { ... [Required] [ForeignKey("UM_Stock_Id")] public virtual UM UM_Stock { get; set; } public virtual int? UM_Stock_Id { get; set; } ... }

Now:

  • I add UM #1
  • I add Article X adding a reference to UM #1
  • If I try to remove UM #1 I need to raise an error, actually UM #1 is marked as deleted and the Article X contains the reference to the deleted record on UM.

Thank you

Showing 11 to 11 of 11 entries