public static async Task <PatronKind> Update(PatronKind patronKindInDatabase, PatronKind patronKind) { await Database.WriteAsync(realm => { patronKindInDatabase.Name = patronKind.Name; patronKindInDatabase.Description = patronKind.Description; }); return(patronKindInDatabase); }
public static async Task <PatronKind> Add(PatronKind patronKind) { await Database.WriteAsync(realm => { patronKind.Id = NextId; patronKind = realm.Add(patronKind); }); return(patronKind); }
public static async void Delete(PatronKind patronKind) { await Database.WriteAsync(realm => realm.Remove(patronKind)); }
public static Task <PatronKind> Update(PatronKind patronKind) { var patronKindInDatabase = GetAndCheckValid(patronKind.Id); return(PatronKindDataAccess.Update(patronKindInDatabase, patronKind)); }
public static Task <PatronKind> Add(PatronKind patronKind) => PatronKindDataAccess.Add(patronKind);