Hi! In this guide, we will learn how to manage and publicize our events, either in person or online, through two web portals.

Things to consider

For the administration and dissemination of a particular event, the data or functionalities to be considered are as follows,
For these purposes, we will have two platforms with the same database. The first to manage the event data, and the second to present this data to the users or attendees of our event.
In the case of the organizers section of an event, on both platforms we would have something like this,
Previous articles
In previous tutorial articles, the explanation for the construction of each of these portals is carried out in detail. Also, the source code of both projects can also be found here:

Resources and tools required

Both portals have been built with ASP.NET 5 & DotVVM. For configurations or functionalities that need to be implemented, the following working tools are required:

Database

Both portals share the same database, whose engine corresponds to SQL Server with entities: Organizer, Sponsor, Event, Speaker, Session, Speaker_has_Session, SessionLevel, and SessionType.
The first thing we have to do is set this database, for this, the SQL script can be found here,
  1. -- -----------------------------------------------------
  2. CREATE TABLE Event (
  3. IdEvent INT NOT NULL IDENTITY(1,1),
  4. Name VARCHAR(45) NOT NULL,
  5. Description VARCHAR(500) NULL,
  6. Icon VARCHAR(45) NULL,
  7. StartDate DATETIME NOT NULL,
  8. EndDate DATETIME NOT NULL,
  9. RegistrationLink VARCHAR(45) NULL,
  10. StreamingLink VARCHAR(45) NULL,
  11. PRIMARY KEY (IdEvent))
  12. ;
  13. -- -----------------------------------------------------
  14. CREATE TABLE Speaker (
  15. IdSpeaker INT NOT NULL IDENTITY(1,1),
  16. FirstName VARCHAR(45) NOT NULL,
  17. SecondName VARCHAR(45) NULL,
  18. FirstLastName VARCHAR(45) NOT NULL,
  19. SecondLastName VARCHAR(45) NULL,
  20. PhotoLink VARCHAR(45) NULL,
  21. TwitterLink VARCHAR(45) NULL,
  22. LinkedInLink VARCHAR(45) NULL,
  23. IdEvent INT NOT NULL,
  24. PRIMARY KEY (IdSpeaker),
  25. INDEX fk_Speaker_Event_idx (IdEvent ASC),
  26. CONSTRAINT fk_Speaker_Event
  27. FOREIGN KEY (IdEvent)
  28. REFERENCES Event (IdEvent)
  29. ON DELETE NO ACTION
  30. ON UPDATE NO ACTION)
  31. ;
  32. -- -----------------------------------------------------
  33. CREATE TABLE SessionType (
  34. IdSessionType INT NOT NULL IDENTITY(1,1),
  35. Name VARCHAR(45) NOT NULL,
  36. Description VARCHAR(45) NULL,
  37. PRIMARY KEY (IdSessionType))
  38. ;
  39. -- -----------------------------------------------------
  40. CREATE TABLE SessionLevel (
  41. IdSessionLevel INT NOT NULL IDENTITY(1,1),
  42. Name VARCHAR(45) NULL,
  43. Description VARCHAR(45) NULL,
  44. PRIMARY KEY (IdSessionLevel))
  45. ;
  46. -- -----------------------------------------------------
  47. CREATE TABLE Session (
  48. IdSession INT NOT NULL IDENTITY(1,1),
  49. Name VARCHAR(45) NOT NULL,
  50. Description VARCHAR(500) NULL,
  51. StartDate DATETIME NULL,
  52. EndDate DATETIME NULL,
  53. IconLink VARCHAR(45) NULL,
  54. IdSessionType INT NOT NULL,
  55. IdSessionLevel INT NOT NULL,
  56. PRIMARY KEY (IdSession),
  57. INDEX fk_Session_SessionType1_idx (IdSessionType ASC),
  58. INDEX fk_Session_SessionLevel1_idx (IdSessionLevel ASC),
  59. CONSTRAINT fk_Session_SessionType1
  60. FOREIGN KEY (IdSessionType)
  61. REFERENCES SessionType (IdSessionType)
  62. ON DELETE NO ACTION
  63. ON UPDATE NO ACTION,
  64. CONSTRAINT fk_Session_SessionLevel1
  65. FOREIGN KEY (IdSessionLevel)
  66. REFERENCES SessionLevel (IdSessionLevel)
  67. ON DELETE NO ACTION
  68. ON UPDATE NO ACTION)
  69. ;
  70. -- -----------------------------------------------------
  71. CREATE TABLE Speaker_has_Session (
  72. IdSpeaker INT NOT NULL,
  73. IdSession INT NOT NULL,
  74. INDEX fk_Speaker_has_Session_Session1_idx (IdSession ASC),
  75. INDEX fk_Speaker_has_Session_Speaker1_idx (IdSpeaker ASC),
  76. CONSTRAINT fk_Speaker_has_Session_Speaker1
  77. FOREIGN KEY (IdSpeaker)
  78. REFERENCES Speaker (IdSpeaker)
  79. ON DELETE NO ACTION
  80. ON UPDATE NO ACTION,
  81. CONSTRAINT fk_Speaker_has_Session_Session1
  82. FOREIGN KEY (IdSession)
  83. REFERENCES Session (IdSession)
  84. ON DELETE NO ACTION
  85. ON UPDATE NO ACTION)
  86. ;
  87. -- -----------------------------------------------------
  88. CREATE TABLE Organizer (
  89. IdOrganizer INT NOT NULL IDENTITY(1,1),
  90. Name VARCHAR(45) NOT NULL,
  91. LogoLink VARCHAR(45) NULL,
  92. WebPage VARCHAR(45) NULL,
  93. Email VARCHAR(45) NULL,
  94. Description VARCHAR(45) NULL,
  95. FacebookLink VARCHAR(45) NULL,
  96. TwitterLink VARCHAR(45) NULL,
  97. InstagramLink VARCHAR(45) NULL,
  98. IdEvent INT NOT NULL,
  99. PRIMARY KEY (IdOrganizer),
  100. INDEX fk_Organizer_Event1_idx (IdEvent ASC),
  101. CONSTRAINT fk_Organizer_Event1
  102. FOREIGN KEY (IdEvent)
  103. REFERENCES Event (IdEvent)
  104. ON DELETE NO ACTION
  105. ON UPDATE NO ACTION)
  106. ;
  107. -- -----------------------------------------------------
  108. CREATE TABLE Sponsor (
  109. IdSponsor INT NOT NULL IDENTITY(1,1),
  110. Name VARCHAR(45) NOT NULL,
  111. LogoLink VARCHAR(45) NULL,
  112. Description VARCHAR(45) NULL,
  113. WebPage VARCHAR(45) NULL,
  114. IdEvent INT NOT NULL,
  115. PRIMARY KEY (IdSponsor),
  116. INDEX fk_Sponsor_Event1_idx (IdEvent ASC),
  117. CONSTRAINT fk_Sponsor_Event1
  118. FOREIGN KEY (IdEvent)
  119. REFERENCES Event (IdEvent)
  120. ON DELETE NO ACTION
  121. ON UPDATE NO ACTION)
  122. ;
A good option to consider for deploying our database to the cloud is Azure SQL Database, which is the same as SQL Server, only in the cloud.
Here we can see a little more of this resource.

Organization of projects

Both projects have been developed taking into account the architectural pattern Model, View, Model View (MVVM), where,
And in Visual Studio 2019 we can visualize something like this for the EventAdmin and EventPortal projects respectively,
All right, with this in mind, let's look at the considerations we should consider when using these two projects.

Settings in BL – Business Layer

For our case study, the database is designed to handle multiple events at once. In this sense, projects in the BL have a class called EventId to handle the ID of the event we want to work with. For both cases, in this class, we will have to place the corresponding Id.
  1. public class EventId
  2. {
  3. private static EventId instance { get; set; } = null;
  4. public int Id { get; set; } = 1;
  5. private EventId() { }
  6. public static EventId GetInstance()
  7. {
  8. if (instance == null) {
  9. instance = new EventId();
  10. }
  11. return instance;
  12. }
  13. }

Settings in PL – Presentation Layer

At the design level, our websites are composed of the following elements,
Administrative Portal
For the administrative web portal we can find something like this,
For this particular portal, there are no design changes at the design level that need to be implemented. In the final, on this website we will be able to view the following,
Information Portal
For our second portal, the one that our attendees will see, here if there are changes or design styles that could be contemplated.
The structure in Visual Studio 2019 is as this,
In which, the general structure of the website is located in the MasterPage.dotmaster,
And the content of the page, defined by the ContentPlaceHolder control with the identifier MainContent, is located in the Default.dothtml.
Here we can make the changes that are considered relevant, taking into account the ViewModel where the definitions and collections that reference the corresponding data of the event are located.
  1. public List<SponsorModel> Sponsors { get; set; }
  2. public List<OrganizerModel> Organizers { get; set; }
  3. public List<CalendarSpeakers> Calendar { get; set; } = new List<CalendarSpeakers>();
  4. public EventModel Event { get; set; }

Publish our informational web portal

To deploy our project so that it can be accessed from the Internet by users in general, for this case we can consider the Azure App Service resource to fulfill this purpose.
In this tutorial article, we can see that process: .NET 5: Deploying Web Applications with Azure App Service.
Thank you very much
Thank you very much for reading, I hope this demo can be of use to you. If you have any questions or ideas that you need to discuss, it will be nice to be able to collaborate and together exchange knowledge with each other.
If you like, we can stay in touch on Facebook, on Twitter, or in Telegram too. :)