Пример #1
0
 public static void WriteSampleClaimXml(string xmlFile, InternalClaim claim)
 {
     var writer = new XmlSerializer(typeof (InternalClaim));
     using (var file = new StreamWriter(xmlFile))
     {
         writer.Serialize(file, claim);
     }
 }
Пример #2
0
        public void Seed()
        {
            Initialize();

            var newClaim = new InternalClaim
                {
                    ClaimId = "1230000",
                    Client = _client,
                    AccidentDescription = "Broke Left Arm",
                    CausedFromAutoAccident = true,
                    OccurredAtEmployment = false,
                    PolicyHolder = _policyHolder,
                    Patient = _child,
                    Extrinsics = new List<ExtrinsicField>
                        {
                            new ExtrinsicField {Name = "HasLifeInsurance", Value = "true", Type = "bool"},
                            new ExtrinsicField {Name = "Notes", Value = "This is a sample note.", Type = "string"},
                        }
                };

            _context.Set<InternalClaim>().Add(newClaim);
            _context.SaveChanges();
        }