Example #1
0
        public static VehicleMD Translate(this VehicleDE from)
        {
            var to = new VehicleMD();

            to.Id          = from.Id;
            to.Type        = from.Type;
            to.Number      = from.Number;
            to.CompanyId   = from.CompanyId;
            to.IsActive    = from.IsActive;
            to.CreatedDate = from.CreatedDate;
            to.CreatedById = from.CreatedById; return(to);
        }
Example #2
0
        public static VehicleDE Translate(this VehicleMD from, VehicleDE dest = null)
        {
            var to = dest ?? new VehicleDE();

            if (from.Id > 0)
            {
                to.Id = from.Id;
            }
            to.IsActive = true;

            to.Type        = from.Type;
            to.Number      = from.Number;
            to.CompanyId   = from.CompanyId;
            to.CreatedDate = from.CreatedDate;
            to.CreatedById = from.CreatedById;

            return(to);
        }