-
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.
Automap Evaluations Move logic from controller to DAL
- Loading branch information
Smith
authored and
Smith
committed
Mar 27, 2020
1 parent
287e534
commit 29f9da1
Showing
11 changed files
with
277 additions
and
166 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.