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(); }
public void CreateCompose(BlogComposes blogComposes) { _blogUnitOfWork.BlogRepository.Add(blogComposes); _blogUnitOfWork.Save(); }