DbModel.cs 990 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
using FLY.OBJComponents.Server.Model;
using SQLite;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FLY.Weight2.Server.Model
{
    /// <summary>
    /// 数据库对象
    /// </summary>
    public class DbModel:SQLiteDbContext,IErrorDBModel
    {
        /// <summary>
        /// Flow表 对象
        /// </summary>
        public DBTable<Db_Flow> TbFlow { get; } = new DBTable<Db_Flow>();

        /// <summary>
        /// Error表 对象
        /// </summary>
潘栩锋's avatar
潘栩锋 committed
24
        public DBTable<Db_Error> TbError { get; } = new DBTable<Db_Error>();
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42

        /// <summary>
        /// 
        /// </summary>
        /// <param name="dbpath">sqlite数据库路径</param>
        public DbModel(string dbpath) : base(dbpath)
        {
            
        }
        /// <summary>
        /// 
        /// </summary>
        public DbModel() : this(@"D:\blowingdata\weight2.sqlite3")
        {

        }
    }
}