Posts

Showing posts from January 3, 2019

Sir Charles Trevelyan, 3rd Baronet

Image
For other people named Charles Trevelyan, see Charles Trevelyan (disambiguation). The Right Honourable Sir Charles Trevelyan Bt President of the Board of Education In office 7 June 1929 – 2 March 1931 Prime Minister Ramsay MacDonald Preceded by Lord Eustace Percy Succeeded by Hastings Lees-Smith In office 22 January 1924 – 3 November 1924 Prime Minister Ramsay MacDonald Preceded by Hon. E. F. L. Wood Succeeded by Lord Eustace Percy Parliamentary Secretary to the Board of Education In office 19 October 1908 – 10 August 1914 Prime Minister H. H. Asquith Preceded by Thomas McKinnon Wood Succeeded by Christopher Addison Member of Parliament for Newcastle Central In office 15 November 1922 – 27 October 1931 Preceded by George Renwick Succeeded by Arthur Denville Member of Parliament for Elland In office 8 March 1899 – 14 December 1918 Preceded by Thomas Wayman Succeeded by George Taylor Ramsden Personal detail

C# Data Contract Class - Extend / Add Attributes

Image
0 I have taken over a new project where we have a Web API that returns data from the back-end database. We have used Data Contract classes to model our objects to each table that we return. My question is around extending what is returned so that we can display additional data on the front-end that is not held in the database. Here is an example of the class: [Serializable] [DataContract] public class ContainersInPort { [DataMember] public string ContainerNumberFull { get; set; } [DataMember] public string PortLocationId { get; set; } [DataMember] public string PortLocation { get; set; } [DataMember] public string PortName { get; set; } } Is there any way I can add a new property to the class above? I have added the following line of code to my class but it returned an out of range exceptio