Exemplo n.º 1
0
        protected override Speciality Execute(Speciality entity, IDbValueSet source)
        {
            entity.Id   = source.GetValue <long>("Id");
            entity.Name = source.GetValue <string>("Name");

            return(entity);
        }
Exemplo n.º 2
0
        protected override Profile Execute(Profile entity, IDbValueSet source)
        {
            entity.FirstName         = source.GetValue <string>("FirstName");
            entity.LastName          = source.GetValue <string>("LastName");
            entity.NotificationEmail = source.GetValue <string>("NotificationEmail");

            return(entity);
        }
		public override bool Valid(IDbValueSet source)
		{
			Precondition.Require(source, () => Error.ArgumentNull("source"));
			foreach (string key in Scheme)
			{
				if (Object.ReferenceEquals(null, source.GetValue<object>(key)))
					return false;
			}
			return true;
		}
 public override bool Valid(IDbValueSet source)
 {
     Precondition.Require(source, () => Error.ArgumentNull("source"));
     foreach (string key in Scheme)
     {
         if (Object.ReferenceEquals(null, source.GetValue <object>(key)))
         {
             return(false);
         }
     }
     return(true);
 }
Exemplo n.º 5
0
        protected override User Execute(User entity, IDbValueSet source)
        {
            entity.Id              = source.GetValue <long>("Id");
            entity.Email           = source.GetValue <string>("Email");
            entity.ActivationKey   = source.GetValue <string>("ActivationKey");
            entity.DateRegistered  = source.GetValue <DateTime>("DateRegistered");
            entity.DateLastVisited = source.GetValue <DateTime>("DateLastVisited");

            Associate(entity.ProfileLink).Subset("Profile.").Apply <ProfileMaterializer>(source);
            Associate(entity.SpecialityLink).With(() => new SingleSpecialityOperation(
                                                      source.GetValue <long>("speciality.Id"))).Subset("Speciality.")
            .Defined("Id").Apply <SpecialityMaterializer>(source);

            return(entity);
        }