I personally do not have objects that implement interfaces. For the Task class, I would not have ITask , which had only the same properties as on it.
I saw how this was done several times, so I wonder where this advice came from and what benefits you will get from it.
If you use ORM, the argument that says “I can change access to data” does not matter, so why do this?
UPDATE:
A good point was made in the comments on INotifyPropertyChanged . It was not my business, but I am talking about something like this:
public interface ITask { int Id { get; set; } string Description { get; set; } } public class Task : ITask { public int Id { get; set; } public string Description { get; set; } }
c # class-design
Neil barnwell
source share