public void DeleteAddress()
        {
            //Arrange
            var address = Repository.GetFirst <Address>();

            //Act
            Repository.Delete(address);
            Repository.Save();

            //Assert
            Assert.False(address.IsActive);
            Assert.NotNull(address.ModifiedDateTime);
            Assert.True(address.ModifiedDateTime.Value.Date == DateTime.Today);
        }
        public async Task DeleteIfUnconfirmedAsync(string email)
        {
            var user = await userManager.FindByEmailAsync(email);

            if (user != null && !user.EmailConfirmed)
            {
                if (user.AddressId != null)
                {
                    repository.Delete <Address>(user.AddressId.Value);
                }

                await userManager.DeleteAsync(user);
            }
        }
 public void Delete <T>(int id) where T : class, IId, IDeletable
 {
     repository.Delete <T>(id);
 }