Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [Key, Column(Order=1)] // composite key with ExternalId. WebshopId+ExternalId must be unique
- [ForeignKey("Webshop_Id")]
- public virtual Webshop WebshopEntity
- {
- get { return _Webshop; }
- set { _Webshop = value; }
- }
- [NotMapped]
- private Webshop _Webshop;
- public int Webshop_Id { get; set; }
- [Key, Column(Order = 2)]
- [MinLength(1, ErrorMessage = "ExternalId must be atleast 1 character")]
- public virtual string ExternalId { get; set; }
- {"Violation of PRIMARY KEY constraint 'PK_dbo.Products'. Cannot insert duplicate key in object 'dbo.Products'. The duplicate key value is (110).rnThe statement has been terminated."}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement