Skip to content

Commit

Permalink
#2075 Fix GetByNameAsync
Browse files Browse the repository at this point in the history
  • Loading branch information
delager authored and kbeaugrand committed Jun 5, 2023
1 parent 319ab75 commit 8af360f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public DeviceModelRepository(PortalDbContext context) : base(context)
public async Task<DeviceModel?> GetByNameAsync(string modelName)
{
return await this.context.Set<DeviceModel>()
.FirstOrDefaultAsync(deviceModel => deviceModel.Name.Equals(modelName, StringComparison.Ordinal));
.FirstOrDefaultAsync(deviceModel => deviceModel.Name == modelName);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public EdgeDeviceModelRepository(PortalDbContext context) : base(context)
public async Task<EdgeDeviceModel?> GetByNameAsync(string edgeModelDevice)
{
return await this.context.Set<EdgeDeviceModel>()
.FirstOrDefaultAsync(edgeDeviceModel => edgeDeviceModel.Name.Equals(edgeModelDevice, StringComparison.Ordinal));
.FirstOrDefaultAsync(edgeDeviceModel => edgeDeviceModel.Name == edgeModelDevice);
}
}
}

0 comments on commit 8af360f

Please sign in to comment.