using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;

namespace RadGridViewCrash.Web.Models
{
    /// <summary>
    /// A compacted result for the search screen.
    /// </summary>
    /// <remarks>
    /// In order to lift along with the WCF RIA Services, 
    /// the data structure needs to be a class with properties; 
    /// public exposed variables or structures are not accepted.
    /// </remarks>
    [Serializable()]
    public class CompanySearchResult
    {
        [Key] // A Key Attribute is required to work along with the WCF RIA Services.
        public int CompanyID{get;set;}
        public Nullable<int> ParentCompanyID{get;set;}
        public String CompanyName { get; set; }
        public String Address { get; set; }
        public String ZipCode { get; set; }
        public String City { get; set; }
        public String Country { get; set; }
        public int ChildCompanies { get; set; }
        public int[] ChildCompanyIDs { get; set; }
    }
}