Created
June 6, 2020 21:24
-
-
Save alimozdemir/eb5fe68d12cca30788e07a64c28633c1 to your computer and use it in GitHub Desktop.
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
if (changedProps.Contains("Status")) | |
{ | |
await _db.Country_Songs.Where(i => i.SongId == instance.Id) | |
.UpdateAsync(i => new Country_Songs() { Status = instance.Status }); | |
} | |
if (changedProps.Contains("Field1")) | |
{ | |
await _db.Country_Songs.Where(i => i.SongId == instance.Id) | |
.UpdateAsync(i => new Country_Songs() { Field1 = instance.Field1 }); | |
} | |
if (changedProps.Contains("Status") || changedProps.Contains("Field1")) | |
{ | |
await _db.Country_Songs.Where(i => i.SongId == instance.Id) | |
.UpdateAsync(i => new Country_Songs() { Status = instance.Status, Field1 = instance.Field1 }); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment