Example #1
0
 public static int SaveAsClone(Mappings.DataObject data)
 {
     using (IConnectinContext cc = DBContext.DB1)
     {
         return(SaveAsClone(cc, data));
     }
 }
Example #2
0
 public static int SaveAsClone(string connName, Mappings.DataObject data)
 {
     using (IConnectinContext cc = DBContext.GetConnection(connName))
     {
         return(SaveAsClone(cc, data));
     }
 }
Example #3
0
        public static int SaveAsClone(IConnectinContext cc, Mappings.DataObject data)
        {
            Type type = data.GetType();

            Mappings.ObjectMapper om     = Mappings.ObjectMapper.GetOM(type);
            Mappings.DataObject   result = (Mappings.DataObject)Activator.CreateInstance(type);
            OnClone(data, result, om);
            return(Save(cc, result));
        }