/// <summary>
 /// Deletes the specified model instance.
 /// </summary>
 /// <typeparam name="T">The actual model type.</typeparam>
 /// <param name="model">A model instance.</param>
 internal static void Delete <T>(T model) where T : PersistentEntity
 {
     PersistenceService.Delete(model);
 }
Esempio n. 2
0
        public async void InsertAndGetLocation()
        {
            var location = await _persistenceService.Get <Location> (_location.Id);

            Assert.Null(location, "location is not null");

            await _persistenceService.Insert(_location);

            location = await _persistenceService.Get <Location> (_location.Id);

            AssertionHelper.AssertLocation(_location, location);

            await _persistenceService.Delete(location);

            location = await _persistenceService.Get <Location> (_location.Id);

            Assert.Null(location, "location is not null");
        }