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