# Find events

Sitefinity CMS allows you to search for a specific event.\
For more information about querying events by ID, see [For developers: Query events](https://www.progress.com/documentation/sitefinity-cms/for-developers-query-events).

To search for a specific event you can use the Native API or the Fluent API.

## Search for an event by title

The following examples search for a specific event with the specified `Title`:

**Native API**

```C#
using System.Linq;
using Telerik.Sitefinity.Events.Model;
using Telerik.Sitefinity.GenericContent.Model;
using Telerik.Sitefinity.Modules.Events;

namespace SitefinityWebApp
{
   public class QueryEventByTitleNativeAPI
   {
       public Event GetEventByTitleNativeAPI(string titleToSearch)
       {
           EventsManager eventsManager = EventsManager.GetManager();
           Event eventItem = eventsManager.GetEvents().Where(e => (e.Title == titleToSearch && e.Status == ContentLifecycleStatus.Live))
               .FirstOrDefault();
           return eventItem;
       }
   }
}
```

First, you initialize `EventsManager`. Then, you get all events using `GetEvents()` and filter based on the `Title` and *Status* properties. Finally, you return the event.

**Fluent API**

```C#
using System.Linq;
using Telerik.Sitefinity;
using Telerik.Sitefinity.Events.Model;
using Telerik.Sitefinity.GenericContent.Model;

namespace SitefinityWebApp
{
   public class QueryEventByTitleFluentAPI
   {
       public Event GetEventByTitleFluentAPI(string titleToSearch)
       {
           Event eventItem = App.WorkWith().Events().Where(ev => (ev.Title == titleToSearch && ev.Status == ContentLifecycleStatus.Live))
               .Get().FirstOrDefault();
           return eventItem;
       }
   }
}
```

First, you initialize the plural facade of the event using `App.WorkWith().Events()`. Then, you filter based on the `Title` and `Status` properties. To get the event, you use the `Get` method. Finally, you return the event.

## Search for events by content match

The following examples search for all events that have the specified string in their content.

**Native API**

```C#
using System.Linq;
using Telerik.Sitefinity.Events.Model;
using Telerik.Sitefinity.GenericContent.Model;
using Telerik.Sitefinity.Modules.Events;

namespace SitefinityWebApp
{
   public class QueryEventByMatchNativeAPI
   {
       public IQueryable<Event> GetEventByContentMatchNativeAPI(string contentToSearch)
       {
           EventsManager eventsManager = EventsManager.GetManager();
           IQueryable<Event> events = eventsManager.GetEvents()
                                   .Where(ev => (ev.Content.Contains(contentToSearch) && ev.Status == ContentLifecycleStatus.Live));
           return events;
       }
   }
}
```

First, you initialize `EventsManager`. Then, you get all events using `GetEvents()` and filter based on the `Content` and `Status` properties. Finally, you return the events.

**Fluent API**

```C#
using System.Linq;
using Telerik.Sitefinity;
using Telerik.Sitefinity.Events.Model;
using Telerik.Sitefinity.GenericContent.Model;

namespace SitefinityWebApp
{
   public class QueryEventByMatchFluentAPI
   {
       public IQueryable<Event> GetEventByContentMatchFluentAPI(string contentToSearch)
       {
           IQueryable<Event> events = App.WorkWith().Events()
                                           .Where(ev => (ev.Content.Contains(contentToSearch) && ev.Status == ContentLifecycleStatus.Live)).Get();
           return events;
       }
   }
}
```

First, you initialize the plural facade of the event using `App.WorkWith().Events()`. Then, you filter based on the *Content* and `Status` properties. To get the events, you use the `Get` method. Finally, you return the events.
