Answers for "there is no implicit reference conversion from 'xxxx.Database.Domain.Entities.Order' to 'System.IDisposable'"

C#
0

there is no implicit reference conversion from 'xxxx.Database.Domain.Entities.Order' to 'System.IDisposable'

Current definition requires TEntity (i.e. Person) to be disposable (you have put IDisposable to constraints of generic type)

public class UnitOfWork<TEntity> where TEntity : class, IDisposable
But I think you want object to be disposable, and entity to be of reference type. So, change definition to

public class UnitOfWork<TEntity> : IDisposable
    where TEntity : class
Posted by: Guest on May-26-2021

Code answers related to "there is no implicit reference conversion from 'xxxx.Database.Domain.Entities.Order' to 'System.IDisposable'"

C# Answers by Framework

Browse Popular Code Answers by Language