Exemplo n.º 1
0
        public String Audit(BaseModel obj)//Make sure that obj contain iD
        {
            string Changes = "";

            if (obj != null)
            {
                string name = obj.GetType().Name;
                name.Substring(0, name.Length - 5);
                Int64     id        = Int64.Parse(PropertyUtils.GetValue(obj, name.Substring(0, name.Length - 5) + "iD").ToString());
                BaseModel oldObject = null;
                oldObject = FindByPK(id);
                Changes   = obj.CompareTo(oldObject);
            }
            return(Changes);
        }