sqlite帮助类 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Data.SQLite; using System.Data; namespace SqliteDemo { /// <summary> /// SQLite 操作类 /// </summary> cla
IoC控制反转(Inversion of Control,英文缩写为IoC)是一个重要的面向对象编程的法则用来解决系统耦合问题. 控制反转还有一个名字叫做依赖注入(DI:Dependency Injection).IoC中最基本的技术就是interface + reflection,"反射(Reflection)"编程. ." IoC 容器的职责是对象的创建,核心是对象的生命周期管理(何时创建/怎么创建/何时销毁),就像一个大工厂,对象"托管"在里面.模式
一.SQLAlchemy和Alembic 主要使用原生的SQLAlchemy进行数据库操作和使用Alemic进行数据库版本控制 I 创建数据库主要有三个步骤 创建表的父类/数据库连接/Session from sqlalchemy import Column, String, create_engine from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import relationship,