Ejemplo n.º 1
0
        public static void Insert(BusinessObject obj)
        {
            BusinessObject insertedObj = new BusinessObject(GetNextID()); ;


            PropertyInfo[] properties = obj.GetType().GetProperties();
            foreach (PropertyInfo prop in properties)
            {
                if (prop.Name != "ID")
                {
                    insertedObj.GetType().GetProperty(prop.Name).SetValue(insertedObj, prop.GetValue(obj, null), null);
                }
            }

            _data.Add(insertedObj);
        }