public static int SaveAsClone(Mappings.DataObject data) { using (IConnectinContext cc = DBContext.DB1) { return(SaveAsClone(cc, data)); } }
public static int SaveAsClone(DB db, Mappings.DataObject data) { using (IConnectinContext cc = DBContext.GetConnection(db)) { return(SaveAsClone(cc, data)); } }
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)); }