public interface IEntityTyped
    [Association(OnTargetRemove = OnRemoveAction.Cascade)]
    [Field(Nullable = false)]
    string ItemType { get; set; }

public class FakeEntity : Entity, IEntityTyped
    public string Idqwe { get; private set; }

    [Association(OnTargetRemove = OnRemoveAction.Default)]
    public string ItemType { get; set; }

Just create this setup, it will fail during compile-time

asked Dec 13 '10 at 04:27

xumix's gravatar image


edited Jan 04 '11 at 16:01

Sergey's gravatar image


Shouldn't your interface inherit from IEntity?

(Dec 17 '10 at 04:22) ara ara's gravatar image

It definitely must inherit IEntity.

I suppose, this code snippet was just a quick and dirty extraction from the domain model (notice the absence of Key attribute on Idwefield, Association attribute on string field, etc.)

(Dec 17 '10 at 04:26) Dmitri Maximov Dmitri%20Maximov's gravatar image

2 Answers:


Compile-time check for interface associations has been removed completely. More thorough integrity check of associations will be performed during building of the domain.

answered Dec 13 '10 at 07:26

Alexis%20Kochetov's gravatar image

Alexis Kochetov

edited Dec 13 '10 at 07:26

Hello xumix,

Thanks, to be done.

answered Dec 13 '10 at 06:38

Dmitri%20Maximov's gravatar image

Dmitri Maximov

Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
toggle preview

powered by OSQA