Refactoring - split data, logic and model layers; custom network exception

This commit is contained in:
Dimitar Byalkov
2023-05-12 12:13:11 +02:00
parent 81109f3d6c
commit ee0b063eec
48 changed files with 256 additions and 160 deletions

View File

@@ -0,0 +1,50 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Models
{
public abstract class GenericMessage
{
private User author;
private string description;
private string title;
private DateTime publishDate;
protected GenericMessage(int id, User author, string description, string title, DateTime publishDate)
{
ID = id;
Author = author;
Description = description;
Title = title;
PublishDate = publishDate;
}
public int ID
{
get; private set;
}
public User Author
{
get => author;
set => author = value;
}
public string Description
{
get => description;
set => description = value;
}
public string Title
{
get => title;
set => title = value;
}
public DateTime PublishDate
{
get => publishDate;
set => publishDate = value;
}
}
}