Esempio n. 1
0
        public static T_Gear ConvertToDB(GearClass gear)
        {
            T_Gear t_gear = new T_Gear();

            t_gear.id          = gear.id;
            t_gear.Name        = gear.Name;
            t_gear.Guid        = gear.Guid;
            t_gear.TeethNumber = gear.TeethNumber;

            return(t_gear);
        }
Esempio n. 2
0
        public static GearClass ConvertFromDB(T_Gear t_gear)
        {
            GearClass gear = new GearClass();

            gear.id          = t_gear.id;
            gear.Name        = t_gear.Name;
            gear.Guid        = t_gear.Guid ?? new Guid();
            gear.TeethNumber = t_gear.TeethNumber ?? 0;

            return(gear);
        }