Compare commits
3 Commits
master
...
TIAM_v0.0.5.1
| Author | SHA1 | Date |
|---|---|---|
|
|
3054d09e33 | |
|
|
4c368e98a7 | |
|
|
f58cacbeaa |
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"ConnectionStrings": {
|
"ConnectionStrings": {
|
||||||
"DeveloperDbConnection": "Data Source=185.51.190.197;Initial Catalog=TIAM_DEV;Trusted_Connection=false;Encrypt=false;TrustServerCertificate=True;Connect Timeout=200;User ID=Anata_Development_Team;Password=v6f_?xNfg9N1;MultipleActiveResultSets=true"
|
"DeveloperDbConnection": "Data Source=195.26.231.218;Initial Catalog=TIAM_DEV;Trusted_Connection=false;Encrypt=false;TrustServerCertificate=True;Connect Timeout=200;User ID=sa;Password=v6f_?xNfg9N1;MultipleActiveResultSets=true"
|
||||||
},
|
},
|
||||||
"Logging": {
|
"Logging": {
|
||||||
"LogLevel": {
|
"LogLevel": {
|
||||||
|
|
|
||||||
|
|
@ -14,15 +14,13 @@ namespace AyCode.Entities.Profiles
|
||||||
{
|
{
|
||||||
[Key, DatabaseGenerated(DatabaseGeneratedOption.None)]
|
[Key, DatabaseGenerated(DatabaseGeneratedOption.None)]
|
||||||
public Guid Id { get; set; }
|
public Guid Id { get; set; }
|
||||||
|
|
||||||
public Guid? UserMediaId { get; set; }
|
public Guid? UserMediaId { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required] public Guid AddressId { get; set; }
|
||||||
public Guid AddressId { get; set; }
|
[ForeignKey(nameof(AddressId))] public virtual TAddress Address { get; set; }
|
||||||
[ForeignKey(nameof(AddressId))]
|
|
||||||
public virtual TAddress Address { get; set; }
|
|
||||||
|
|
||||||
[Required]
|
[Required] public string Name { get; set; }
|
||||||
public string Name { get; set; }
|
|
||||||
|
|
||||||
public string? FullName => GetFullName("ENG");
|
public string? FullName => GetFullName("ENG");
|
||||||
public string? FirstName { get; set; }
|
public string? FirstName { get; set; }
|
||||||
|
|
@ -38,7 +36,9 @@ namespace AyCode.Entities.Profiles
|
||||||
public DateTime Created { get; set; }
|
public DateTime Created { get; set; }
|
||||||
public DateTime Modified { get; set; }
|
public DateTime Modified { get; set; }
|
||||||
|
|
||||||
protected AcProfile() { }
|
protected AcProfile()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
protected AcProfile(Guid id) : this()
|
protected AcProfile(Guid id) : this()
|
||||||
{
|
{
|
||||||
|
|
@ -58,17 +58,16 @@ namespace AyCode.Entities.Profiles
|
||||||
AddressId = address.Id;
|
AddressId = address.Id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public string? GetFullName(string lang = "ENG") => GetFullName(FirstName, LastName, lang);
|
public string GetFullName(string lang = "ENG") => GetFullName(FirstName, LastName, lang);
|
||||||
|
|
||||||
public static string? GetFullName(string? firstName, string? lastName, string? lang = "ENG")
|
public static string GetFullName(string? firstName, string? lastName, string? lang = "ENG")
|
||||||
{
|
{
|
||||||
if (firstName.IsNullOrWhiteSpace()) return lastName;
|
string fullName;
|
||||||
|
|
||||||
if(lastName.IsNullOrWhiteSpace()) return firstName;
|
if (lang == "ENG") fullName = firstName + " " + lastName;
|
||||||
|
else fullName = lastName + " " + firstName;
|
||||||
|
|
||||||
if (lang == "ENG") return firstName + " " + lastName;
|
return (fullName.IsNullOrWhiteSpace() ? "Missing name!" : fullName.Trim());
|
||||||
|
|
||||||
return lastName + " " + firstName;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue