Can I do something like this:
public abstract class DeletableEntity
{
[DataMember]
public bool Delete { get; set; }
}
[DataContract]
public class MyClass : DeletableEntity
{
[DataMember]
public int ID { get; set; }
}
I really only need DeletableEntity
so others can inherit from it, so it doesn't need to go over WCF, can I send its Delete
member with my MyClass
without having to send the DeletableEntity
as well?
No that should not be possible. From your requirements it would be simpler to use interfaces. Also, as an advise please consider using Known Types. This is not really directly related to you problem but it will allow you to use 'polymorphism' over wcf. More details can be obtained here: http://msdn.microsoft.com/en-us/magazine/gg598929.aspx