Badges.Controllers.BadgeController.MyExperiences C# (CSharp) Method

MyExperiences() public method

Returns work associated with this student, optionally filtered by a 'search' string
public MyExperiences ( string filter ) : System.Web.Mvc.ActionResult
filter string Currently filters by name of experience
return System.Web.Mvc.ActionResult
        public ActionResult MyExperiences(string filter)
        {
            var experienceQuery = RepositoryFactory.ExperienceRepository.Queryable
                             .Where(x => x.Creator.Identifier == CurrentUser.Identity.Name);

            if (!string.IsNullOrWhiteSpace(filter))
            {
                experienceQuery = experienceQuery.Where(x => x.Name == filter);
            }

            var experiences = experienceQuery
                .OrderByDescending(x => x.Created)
                .Take(5);

            return GetWorkForExperiences(experiences);
        }