15 lines
304 B
C#
15 lines
304 B
C#
using models.Core;
|
|
using MongoDB.Driver;
|
|
|
|
namespace data.Events;
|
|
|
|
public class GetAll
|
|
{
|
|
public List<Event> Execute()
|
|
{
|
|
var database = MongoFactory.GetDatabase();
|
|
var collection = database.GetCollection<Event>("events");
|
|
|
|
return collection.Find(_ => true).ToList();
|
|
}
|
|
} |