You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
782 B
30 lines
782 B
using Entity_Framework;
|
|
using Entity_Framework.Entity;
|
|
using Entity_Framework.Factories;
|
|
using Modele.Classe;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Extraction_Donnees.Extraction
|
|
{
|
|
public partial class Extraction
|
|
{
|
|
public Task<Image> GetImage(int IdPilote)
|
|
{
|
|
Images image = new Images();
|
|
using (BDDContext db = new BDDContext())
|
|
{
|
|
image = db.Images.Where( e => e.IdPilote == IdPilote).FirstOrDefault();
|
|
}
|
|
if ( image == null)
|
|
{
|
|
return Task.FromResult<Image>(null);
|
|
}
|
|
return Task.FromResult<Image>(image.EntityToModele());
|
|
}
|
|
}
|
|
}
|