C# Class InsanelySimpleBlog.Controllers.InsanelySimpleBlogPostController

We don't just rely on the namespace to differentiate our controller from other controllers that might be called "PostController" as currently Web API doesn't deal with two controllers in different namespaces with the same name.
Inheritance: ApiController
Show file Open project: JamesRandall/Insanely-Simple-Blog Class Usage Examples

Public Methods

Method Description
GetPost ( int id ) : PostViewModel
GetPosts ( int pageNumber, int pageSize, int categoryId = null, System.DateTime startDate = null, System.DateTime endDate = null ) : IEnumerable
InsanelySimpleBlogPostController ( ) : System
InsanelySimpleBlogPostController ( IPostsService postsService ) : System

Method Details

GetPost() public method

public GetPost ( int id ) : PostViewModel
id int
return InsanelySimpleBlog.ViewModel.PostViewModel

GetPosts() public method

public GetPosts ( int pageNumber, int pageSize, int categoryId = null, System.DateTime startDate = null, System.DateTime endDate = null ) : IEnumerable
pageNumber int
pageSize int
categoryId int
startDate System.DateTime
endDate System.DateTime
return IEnumerable

InsanelySimpleBlogPostController() public method

public InsanelySimpleBlogPostController ( ) : System
return System

InsanelySimpleBlogPostController() public method

public InsanelySimpleBlogPostController ( IPostsService postsService ) : System
postsService IPostsService
return System