Saving accounts To DB

This commit is contained in:
Mikhail Shabanov committed 2020-11-06 19:23:20 +01:00
1 parent 31b067e087
commit ddbf42e7bb
14 files changed
+372 -54

No files matched your search

@@ -0,0 +1,52 @@
using System;
namespace WotBlitzStatisticsPro.DataAccess.Model.Accounts
{
public class AccountInfoHistoryKey : IEquatable<AccountInfoHistoryKey>
{
public AccountInfoHistoryKey()
{
}
public AccountInfoHistoryKey(long accountId, int lastBattleTime)
{
AccountId = accountId;
LastBattleTime = lastBattleTime;
}
public long AccountId { get; set; }
public int LastBattleTime { get; set; }
public bool Equals(AccountInfoHistoryKey other)
{
if (ReferenceEquals(null, other)) return false;
if (ReferenceEquals(this, other)) return true;
return AccountId == other.AccountId && LastBattleTime == other.LastBattleTime;
}
public override bool Equals(object obj)
{
if (ReferenceEquals(null, obj)) return false;
if (ReferenceEquals(this, obj)) return true;
if (obj.GetType() != this.GetType()) return false;
return Equals((AccountInfoHistoryKey) obj);
}
public override int GetHashCode()
{
return HashCode.Combine(AccountId, LastBattleTime);
}
public static bool operator ==(AccountInfoHistoryKey left, AccountInfoHistoryKey right)
{
return Equals(left, right);
}
public static bool operator !=(AccountInfoHistoryKey left, AccountInfoHistoryKey right)
{
return !Equals(left, right);
}
}
}