Exemplo n.º 1
0
        public TechObject TechObjectFromDb(DbTechObject theDbData)
        {
            var config = new MapperConfiguration(cfg => cfg.CreateMap <DbTechObject, TechObject>());
            var mapper = new Mapper(config);
            var model  = mapper.Map <TechObject>(theDbData);

            return(model);
        }
Exemplo n.º 2
0
        public long?InsertTech(SQLiteConnection theConnection, DbTechObject objectToSave)
        {
            long?result = null;

            try
            {
                result = theConnection.Insert(objectToSave);
            }
            catch (Exception)
            {
                theConnection.Close();
                throw;
            }
            return(result);
        }
Exemplo n.º 3
0
 public long?InsertTech(DbTechObject objectToSave)
 {
     try
     {
         var sQLiteConnection = new SQLiteConnection(this._connectionString);
         sQLiteConnection.Open();
         var result = InsertTech(sQLiteConnection, objectToSave);
         sQLiteConnection.Close();
         return(result);
     }
     catch (Exception)
     {
         throw;
     }
 }