I have searched through the forums here and haven't found exactly what we are trying to do although I found a thread from 2009 that said it's not possible in designer to have an entity/sub-type where there is no database table.
Using adapter, we want to add one field to an entity that is temporary, and used for calculations in the middleware but only in one part of the app, and the lead designer doesn't want to add the property to the main entity, since most of the time it is not necessary (overhead?, confusion), so he wanted to create a subclass/inherit a new class from an entity, add the field and pass that from client to middleware via remoting iis.
However, this doesn't work when remoting. Is there any way to do it or do we have to either fake a table for the designer to generate or just add the property to the actual entity?
namespace STaCS.CW.Middleware.EntityClasses
{
[Serializable]
public class SampleVolumeChange : SampleEntity
{
private decimal? _sourceSampleVolumeVal = null;
[Browsable(true)]
public decimal? SourceSampleVolumeVal { get { return _sourceSampleVolumeVal; } set { _sourceSampleVolumeVal = value; } }
protected override void SerializeOwnedData(SerializationWriter writer, object context)
{
base.SerializeOwnedData(writer, context);
writer.WriteNullable(_sourceSampleVolumeVal);
}
protected override void DeserializeOwnedData(SerializationReader reader, object context)
{
base.DeserializeOwnedData(reader, context);
_sourceSampleVolumeVal = reader.ReadNullableDecimal();
}
}
thoughts/ideas/not possible?
Thanks