c# method is not returning object : This is a little bit confusing. I came across some posts that provide example that should return object or value like this

    public X DoSomething(int number)
    {
          //do something
         return this;
 
    }


if I understand well. It should return object X after performing some action.
However, it is not the case. On the other hand this code returns object 

     public IEnumerable<Movie> FindMovie(int _movieId)
        {


            return this.MoviesLibrary.Where(movie => movie.MovieId == _movieId);


        }

I want to return a List that can be filtered in a way like this

    var library = new Library <Movie> ();
    library.GetAvailable().GetByGenre("Action");



Is it better to create extension methods?

So far my attempts to create a method as part of Library class and chaining them together failed. Method displays casting error. It would seem that example I provided in the beginning is incorrect

      public IEnumerable<Movie> GetByYear(int _year)
        {
           this.MoviesLibrary.Where(movie => movie.MovieId == _movieId);

            return this;


        }

Thanks