using System.Collections.Immutable; using Connected.Entities; using Connected.ServiceModel; using Connected.Services; using Ops = Logistics.Types.WarehouseLocations.WarehouseLocationOps; namespace Logistics.Types.WarehouseLocations; internal sealed class WarehouseLocationService : EntityService, IWarehouseLocationService { public WarehouseLocationService(IContext context) : base(context) { } public async Task Delete(PrimaryKeyArgs args) { await Invoke(GetOperation(), args); } public Task Insert(InsertWarehouseLocationArgs args) { return Invoke(GetOperation(), args); } public async Task Patch(PatchArgs args) { if (await Select(args.Id) is not WarehouseLocation entity) return; await Update(args.Patch(entity)); } public async Task> Query(QueryArgs? args) { return await Invoke(GetOperation(), args ?? QueryArgs.Default); } public async Task> Query(QueryWarehouseLocationArgs args) { return await Invoke(GetOperation(), args); } public async Task> Query(PrimaryKeyListArgs args) { return await Invoke(GetOperation(), args); } public async Task> QueryChildren(QueryWarehouseLocationChildrenArgs args) { return await Invoke(GetOperation(), args); } public async Task Select(PrimaryKeyArgs args) { return await Invoke(GetOperation(), args); } public async Task Select(SelectWarehouseLocationArgs args) { return await Invoke(GetOperation(), args); } public async Task Update(UpdateWarehouseLocationArgs args) { await Invoke(GetOperation(), args); } }