What is the purpose of having an interface for a model class when there is no methods for this class and its not inheriting anywhere other than Event
class? Please read the question properly. It's about model class and interface not about interface inheritance for a normal class.
public interface IEvent
{
int EventID{get;set;}
string EventName{get;set;}
}
public class Event:IEvent
{
public Event(int eventID, string eventName)
{
this.EventID = eventID;
this.EventName = eventName;
}
public int EventID { get; set; }
public string EventName { get; set; }
}