Skip to content

Latest commit

 

History

History
19 lines (12 loc) · 498 Bytes

File metadata and controls

19 lines (12 loc) · 498 Bytes

GCop 429

"Change to {LambdaIdentifier.Id} == {EntityObject} as you can compare Guid with Entity directly. It handles null too."

Rule description

Science you can compare Guid with Entity, there is no need to compare it with Guid property of the other Entity. It handles null too.

Example

var result = Database.GetList<Customer>(s => s.Id == myCustomer.ID);

should be 🡻

var result = Database.GetList<Customer>(s => s.Id == myCustomer);