Skip to content

Instantly share code, notes, and snippets.

@alimozdemir
Created June 6, 2020 21:24
Show Gist options
  • Save alimozdemir/eb5fe68d12cca30788e07a64c28633c1 to your computer and use it in GitHub Desktop.
Save alimozdemir/eb5fe68d12cca30788e07a64c28633c1 to your computer and use it in GitHub Desktop.
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