I'mtryingtodevelopawebsystemthatworksasamessaging-orientedsocialnetwork.
Havingtheclassesusuario.cs
andInformacao.cs
(whichworksasamessage),Ineedtomakeattachmentsavailableinthisinformation,messagesarepostedoneachuserpage,suchaspagesofablog.Ausercansendseveralfilesalongwiththemessagetoanotheruser,thepartofthemessagesIalreadyhave,whatIneednowistoimplementtheattachments.Theusershouldbeabletosendattachmentsintheirmessagesanddownloadattachmentsinothermessages.
WhatkindofattributedoIneed?Whatis"healthier" for the system, files saved in the database or files saved in a reserved directory?
I do not want the whole controller code ready, I need indications only, what kind of attribute to use, precautions, cleanest way to do this, that kind of help.
Information.cs
public class Informacao
{
[Key]
public int InformacaoID { get; set; }
[Required(ErrorMessage = "Digite algo.")]
public String Mensagem { get; set; }
public virtual Usuario Autor { get; set; }
[Required]
public DateTime DataPublicacao { get; set; }
}