Exemplo n.º 1
0
 private void testVariables(RepresentorDbRecord o, string id, string name, string email, DateTime vFrom,
                            DateTime vTo)
 {
     Assert.AreEqual(id, o.ID);
     Assert.AreEqual(name, o.Name);
     Assert.AreEqual(email, o.Email);
     Assert.AreEqual(vFrom, o.ValidFrom);
     Assert.AreEqual(vTo, o.ValidTo);
 }
Exemplo n.º 2
0
        public static RepresentorObject Create(string id, string name, string email, DateTime?validFrom = null,
                                               DateTime?validTo = null)
        {
            var o = new RepresentorDbRecord
            {
                ID        = id,
                Name      = name,
                Email     = email,
                ValidFrom = validFrom ?? DateTime.MinValue,
                ValidTo   = validTo ?? DateTime.MaxValue
            };

            return(new RepresentorObject(o));
        }
 private static string add(SentryDbContext c, RepresentorDbRecord representor)
 {
     representor.ID = Guid.NewGuid().ToString();
     c.Representors.Add(representor);
     return(representor.ID);
 }