예제 #1
0
        public void EditCompose(BlogComposes blogComposes)
        {
            var existingCompose = _blogUnitOfWork.BlogRepository.GetById(blogComposes.Id);

            existingCompose.Title      = blogComposes.Title;
            existingCompose.Body       = blogComposes.Body;
            existingCompose.ImageUrl   = blogComposes.ImageUrl;
            existingCompose.CategoryId = blogComposes.CategoryId;

            _blogUnitOfWork.Save();
        }
예제 #2
0
 public void CreateCompose(BlogComposes blogComposes)
 {
     _blogUnitOfWork.BlogRepository.Add(blogComposes);
     _blogUnitOfWork.Save();
 }