using WIDESEA_Core.BaseRepository; using WIDESEA_Core.BaseServices; using WIDESEA_IStockService; using WIDESEA_Model.Models; namespace WIDESEA_StockService { public partial class StockInfoDetailService : ServiceBase>, IStockInfoDetailService { public StockInfoDetailService(IRepository BaseDal) : base(BaseDal) { } public IRepository Repository => BaseDal; public bool ExistBarcodes(string barcode) { return BaseDal.QueryFirst(x => x.Barcode == barcode) != null; } public bool ExistBarcodes(List barcodes) { return BaseDal.QueryFirst(x =>!string.IsNullOrEmpty( x.Barcode) && barcodes.Contains(x.Barcode)) != null; } } }