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; }
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; }
public static DalBlog ToDal(this BllBlog blog) { return(new DalBlog { Id = blog.Id, Title = blog.Title, UserId = blog.UserId }); }
public void Delete(BllBlog entity) { repository.Delete(entity.ToDal()); unitOfWork.Commit(); }
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; }