Skip to content

Instantly share code, notes, and snippets.

@programatt
Created February 8, 2012 05:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save programatt/1765835 to your computer and use it in GitHub Desktop.
Save programatt/1765835 to your computer and use it in GitHub Desktop.
Data Model problems
using System;
using System.ComponentModel;
namespace ProblemChild.Models
{
public class FinancialProductBase
{
public int Id { get; set; }
public DateTime Timestamp { get; set; }
public string TraderName { get; set; }
}
public class SpecialFinancialProduct1:FinancialProductBase
{
public int Quantity1 { get; set; }
public int Quantity2 { get; set; }
}
public class DifferentSpecialFinancialProduct:SpecialFinancialProduct1
{
[DisplayName("New Quantity")]
public new int Quantity1 { get; set; }
[DisplayName("Old Quantity")]
public new int Quantity2 { get; set; }
}
public class NotSpecialFinancialProduct:FinancialProductBase
{
[DisplayName("Entry Time")]
public new DateTime Timestamp { get; set; }
public string Comment { get; set; }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment