public async Task Validate(HamsterUpdate model) { if (model == null) { throw new ArgumentNullException(); } var identity = await IdentityResolver.GetIdentityAsync(); var hamster = DbContext.Hamsters.SingleOrDefault(h => h.Id == model.Id); if (hamster.CreatedById != identity.Id) { throw new HamsterAccessException(); } }