using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using AyCode.Interfaces.Addresses; namespace AyCode.Database.DbSets.Addresses { public static class AcAddressDbSetExtensions { public static IQueryable GetAddresses(this IAcAddressDbSetBase ctx) where TAddress : class, IAcAddress => ctx.Addresses; public static TAddress? GetAddressById(this IAcAddressDbSetBase ctx, Guid addressId) where TAddress : class, IAcAddress => ctx.GetAddresses().FirstOrDefault(x => x.Id == addressId); } }