Is adding the following to the LanguageService delete call a good solution?
public override void Delete(Language entity)
{
IUnitOfWork unitOfWork= _repository.UnitOfWork();
try
{
unitOfWork.BeginTransaction();
//ApplicationSettingDetails
while (entity.ApplicationSettingDetails.Count() > 0)
{
unitOfWork.Repository<ApplicationSettingDetail>().Delete(entity.ApplicationSettingDetails.First());
}
base.Delete(entity.LanguageId);
unitOfWork.Commit();
}
catch (Exception ex)
{
unitOfWork.Rollback();
throw ex;
}
}