An end-to-end ASP.NET content-management system: Razor SPA for browsing, WebForms for administration, and a centralized EF data model.
- Type: ASP.NET MVC Razor application (.NET Framework 4.7.2)
- Purpose: Single-page app for browsing and searching news posts
- Key components:
- Controllers: Expose JSON endpoints under
/api
(e.g.,GetPosts
,GetCategories
) - Views: Razor (
.cshtml
) templates in \Views folder - Client scripts: Knockout.js bindings and custom JS in
Scripts/
- Styling: Bootstrap CSS and Layout in
Content/
- Controllers: Expose JSON endpoints under
- Config:
Web.config
holds two connection strings:- DefaultConnection for LocalDB or Azure SQL
- DataEntities for Entity Framework EDMX model
- Type: ASP.NET WebForms application (.NET Framework 4.7.2)
- Purpose: Manage news content, categories, and media uploads
- Key components:
- Pages: CRUD pages under
Pages/
(e.g.,ListPosts.aspx
,EditPost.aspx
) - Authentication: Forms authentication via
~/Pages/Login.aspx
- Data access: Uses the same
DataEntities
EDMX connection
- Pages: CRUD pages under
- Config:
Web.config
includesDataEntities
EF connection and auth settings
- Type: Class Library (Entity Framework, Database-First)
- Purpose: Define data model and repository for EchoStream
- Key components:
- EDMX model: Entities such as
Post
,Category
,User
- Repositories:
DataHandlers
namespace implementing CRUD methods
- EDMX model: Entities such as
- Usage: Referenced by both
es.view
andes.admin
solutions
- Visual Studio Community 2022 (ASP.NET and web development workloads)
- Microsoft SQL Express for development (or Azure SQL for production)
- SQL Server Management Studio (SSMS)
- .NET Framework 4.7.2 SDK
- Entity Framework 6
-
Clone the repo:
git clone https://github.com/BenjaminDanker/EchoStream.git cd EchoStream
-
Open Solutions:
- Launch
es.data.sln
, build to generate EF model classes - Launch
es.admin.sln
andes.view.sln
- Run
Update-Package Microsoft.CodeDom.Providers.DotNetCompilerPlatform -r
in case of error
- Launch
-
Configure connection strings in each
Web.config
:<connectionStrings> <add name="DefaultConnection" connectionString="Data Source=(LocalDb)\MSSQLLocalDB;Initial Catalog=EchoStreamDB;Integrated Security=True" providerName="System.Data.SqlClient" /> <add name="DataEntities" connectionString="metadata=res://*/DataModel.csdl|res://*/DataModel.ssdl|res://*/DataModel.msl;provider=System.Data.SqlClient;provider connection string=\"Data Source=(LocalDb)\\MSSQLLocalDB;Initial Catalog=EchoStreamDB;Integrated Security=True;MultipleActiveResultSets=True\"" providerName="System.Data.EntityClient" /> </connectionStrings>
-
Ensure Database:
- Create
EchoStreamDB
in SQL Server - Ensure schema matches EDMX (update model if needed using Visual Studio EDMX designer)
- Create
-
Run:
- es.data: (class library) no execution
- es.admin: Press F5, browse to
/Pages/Login.aspx
to access admin UI - es.view: Press F5, browse to
/
for the front-end SPA
flowchart TD
subgraph Solutions
V[es.view: MVC Razor SPA front end]
A[es.admin: WebForms Admin Portal]
D[es.data: Entity Framework Data Layer]
end
V <--> D
A <--> D
graph LR
User --> V[es.view]
V --> API[API Controllers]
API --> D[es.data]
D --> SQL[(SQL Server)]
AdminUser --> A[es.admin]
A --> D
- Fork and clone the repo
- Create a feature branch:
feature/YourFeature
- Commit changes with clear messages
- Push and open a Pull Request
MIT License. See LICENSE for details.