using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using System.Data.Entity.Core.Objects; using System.Linq; using System.Web; using System.Runtime.Serialization; using Microsoft.AspNet.Identity.EntityFramework; using Newtonsoft.Json; using Resources; using Weee.DAL; namespace Weee.Models { [Table("CertificationCompany")] public class CertificationCompany : Company, IValidatableObject { public CertificationCompany() : base() { VerifyLCAs = new HashSet(); } [InverseProperty("VerifyBy")] [JsonIgnore] [IgnoreDataMember] public virtual ICollection VerifyLCAs { get; set; } [NotMapped] public ICollection CompletedLCAs { get { return VerifyLCAs.Where(x => x.Status == LCAStatus.Completed).ToList(); } } } }