Example #1
0
        public static void Insert(BookTagViewModel target)
        {
            var dao = new BookTagDao();

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

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

            dao.Delete(new Dictionary <string, object>()
            {
                { "BookID", deleteEntity.BookID }, { "TagID", deleteEntity.TagID }
            });
        }
Example #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);
        }
Example #5
0
        public override void CreateTable(IConnection connection)
        {
            var dao = new BookTagDao();

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

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

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