-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PIMS-1220, PIMS-1221, PIMS-1222 (#88)
* PIMS-1220, PIMS-1221, PIMS-1222 Automap Evaluations Move logic from controller to DAL Rewrite DAL logic to be less verbose, support direct write of automapper entities. * code review comments Co-authored-by: Smith <[email protected]>
- Loading branch information
1 parent
287e534
commit dc3b655
Showing
11 changed files
with
203 additions
and
167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
using System; | ||
using System.Diagnostics.CodeAnalysis; | ||
|
||
namespace Pims.Api.Models | ||
{ | ||
public class EvaluationModel : BaseModel, IEquatable<EvaluationModel> | ||
{ | ||
#region Properties | ||
public int PropertyId { get; set; } | ||
|
||
public int FiscalYear { get; set; } | ||
|
||
public float EstimatedValue { get; set; } | ||
|
||
public float AssessedValue { get; set; } | ||
|
||
public float NetBookValue { get; set; } | ||
|
||
public override bool Equals(object obj) | ||
{ | ||
return Equals(obj as EvaluationModel); | ||
} | ||
|
||
public bool Equals([AllowNull] EvaluationModel other) | ||
{ | ||
return other != null && | ||
base.Equals(other) && | ||
PropertyId == other.PropertyId && | ||
FiscalYear == other.FiscalYear && | ||
EstimatedValue == other.EstimatedValue && | ||
AssessedValue == other.AssessedValue && | ||
NetBookValue == other.NetBookValue; | ||
} | ||
|
||
public override int GetHashCode() | ||
{ | ||
var hash = new HashCode(); | ||
hash.Add(base.GetHashCode()); | ||
hash.Add(PropertyId); | ||
hash.Add(FiscalYear); | ||
hash.Add(EstimatedValue); | ||
hash.Add(AssessedValue); | ||
hash.Add(NetBookValue); | ||
return hash.ToHashCode(); | ||
} | ||
|
||
#endregion | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.