24 lines
595 B
C#
24 lines
595 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 AddressRepository : IAddressRepository
|
|
{
|
|
public Address GetAddressById(int AddressId)
|
|
{
|
|
using var context = new StockContext();
|
|
var entity = (from adr in context.Addresses
|
|
where adr.Id == AddressId
|
|
select adr).FirstOrDefault();
|
|
return entity;
|
|
}
|
|
}
|
|
}
|