using WMS_GIRAF_Interface.Data; using WMS_GIRAF_Interface.Entities; using WMS_GIRAF_Interface.Repositories.Interface; namespace WMS_GIRAF_Interface.Repositories.Implement; public class WhCellRepository(MichelinDbContext context):IWhCellRepository { public WH_CELL? GetCell(int cellId) { var cell = context.Wh_Cell.First(x => x.CELL_ID == cellId); return cell; } public WH_CELL? GetCell(string cellCode) { var cell = context.Wh_Cell.FirstOrDefault(x => x.CELL_CODE == cellCode); return cell; } public bool UpdateCellStatus(WH_CELL whCell) { if (whCell == null) { throw new ArgumentNullException(nameof(whCell)); } context.Wh_Cell.Update(whCell); context.SaveChanges(); return true; } }