Esempio n. 1
0
        public static void Insert(BookTagViewModel target)
        {
            var dao = new BookTagDao();

            dao.Insert(target.ToEntity());
            s_logger.Debug($"INSERT BookTag:{target}");
        }
Esempio n. 2
0
        public override void DropTable(IConnection connection)
        {
            var dao = new BookTagDao();

            dao.DropTable();
            ++ModifiedCount;
        }
Esempio n. 3
0
        public static void Delete(BookTagViewModel deleteEntity)
        {
            var dao = new BookTagDao();

            dao.Delete(new Dictionary <string, object>()
            {
                { "BookID", deleteEntity.BookID }, { "TagID", deleteEntity.TagID }
            });
        }
Esempio n. 4
0
        public static bool Exists(BookTagViewModel target)
        {
            var dao = new BookTagDao();

            return(dao.CountBy(new Dictionary <string, object>()
            {
                { "BookID", target.BookID }, { "TagID", target.TagID }
            }) > 0);
        }
Esempio n. 5
0
        public override void CreateTable(IConnection connection)
        {
            var dao = new BookTagDao();

            dao.CreateTableIfNotExists();
            ++ModifiedCount;
            dao.CreateIndexIfNotExists();
            ++ModifiedCount;
        }
Esempio n. 6
0
        public static long CountAll()
        {
            var dao = new BookTagDao();

            return(dao.CountAll());
        }
Esempio n. 7
0
        public static IEnumerable <BookTagViewModel> FindAll()
        {
            var dao = new BookTagDao();

            return(dao.FindAll().ToViewModel());
        }