Пример #1
0
        //Methods

        public bool ExecuteCreationTable(string statement)
        {
            bool success = false;

            try
            {
                Context.CreationTable(statement);
                success = true;
            }
            catch (SqliteException ex) {
                SqLiteExceptionHandler <SqliteException> error = new SqLiteExceptionHandler <SqliteException>(ex);
                LoggerHelper.LogConsole("Database Error : ");
                LoggerHelper.LogConsole("Description" + error.GetDescription());
                LoggerHelper.LogConsole("TrackTrace" + error.GetTrackTrace());
            }
            return(success);
        }
Пример #2
0
        public bool EntityUpdate <TEntity>(IEntity entity) where TEntity : IEntity
        {
            bool success = false;

            try
            {
                ApplicationPlatformContext <TEntity> ContextEntity = new ApplicationPlatformContext <TEntity>();
                ContextEntity.Initialized();
                EntityRepository <TEntity> repository = new EntityRepository <TEntity>(ContextEntity, entity, false);
                repository.Update(entity);
            }
            catch (SqliteException ex)
            {
                SqLiteExceptionHandler <SqliteException> error = new SqLiteExceptionHandler <SqliteException>(ex);
                LoggerHelper.LogConsole("Database Error : ");
                LoggerHelper.LogConsole("Description" + error.GetDescription());
                LoggerHelper.LogConsole("TrackTrace" + error.GetTrackTrace());
            }
            return(success);
        }