24 lines
589 B
C#
24 lines
589 B
C#
using DataDomain;
|
|
using DatamodelLibrary;
|
|
using StockDAL.Interface;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace StockDAL
|
|
{
|
|
public class PersonRepository : IPersonRepository
|
|
{
|
|
public Person GetPersonById(int personId)
|
|
{
|
|
using var context = new StockContext();
|
|
var entity = (from prs in context.Persons
|
|
where prs.Id == personId
|
|
select prs).FirstOrDefault();
|
|
return entity;
|
|
}
|
|
}
|
|
}
|