Exemplo n.º 1
0
        public bool Add(ArticleDto dto)
        {
            var article = new Article()
            {
                AddTime     = DateTime.Now,
                BrowseCount = 55,
                CateId      = SnowflakeId.GetID(),
                Content     = "xxxxxxxxxxxxxxxxxxx",
                Description = "xxxxxxxxxxxxxxxxxxx",
                Status      = 0,
                ThumbnailId = SnowflakeId.GetID(),
                Title       = "asfasfas",
                Tag         = "xx",
                UpdateTime  = DateTime.Now,
                UserId      = SnowflakeId.GetID()
            };

            _articleRep.Add(article);
            return(_unitOfWork.SaveChange() > 0);
        }
Exemplo n.º 2
0
 public EntityRoot()
 {
     Id = SnowflakeId.GetID();
 }