예제 #1
0
 public PostViewModel(BllPost post, IEnumerable <BllTag> tags, BllBlog blog, BllUser user) : base(post, tags)
 {
     UserId    = user.Id;
     BlogId    = blog.Id;
     FirstName = user.FirstName;
     LastName  = user.LastName;
 }
예제 #2
0
 public MainModel(BllUser user, BllBlog blog, BllPost lastPost)
 {
     UserId    = user.Id;
     BlogId    = blog.Id;
     Title     = blog.Title;
     FirstName = user.FirstName;
     LastName  = user.LastName;
     LastPost  = lastPost;
 }
예제 #3
0
 public static DalBlog ToDal(this BllBlog blog)
 {
     return(new DalBlog
     {
         Id = blog.Id,
         Title = blog.Title,
         UserId = blog.UserId
     });
 }
예제 #4
0
파일: BlogService.cs 프로젝트: nnnuker/Blog
 public void Delete(BllBlog entity)
 {
     repository.Delete(entity.ToDal());
     unitOfWork.Commit();
 }
예제 #5
0
 public PostMainModel(int pageNumber, IEnumerable <PostModel> mainModels, BllUser user, BllBlog blog)
 {
     PageNumber = pageNumber;
     MainModels = mainModels;
     UserId     = user.Id;
     FirstName  = user.FirstName;
     LastName   = user.LastName;
     BlogTitle  = blog.Title;
     BlogId     = blog.Id;
 }