C# Tutorial - Advanced Messaging Library with Entity Framework, Response/Request, and D.I. Part-1
This is a .net standard library using best practices, entity framework, and autofac. The video begins going over the sql aspects creating a database, making tables, populating tables with data, and setting up a connection user. I switch to c#, implementing a folder architecture for my project. Then i move into setting up my entity framework core models and database context. Once completed the video shifts to scoping and implementation of a service that handles interactions with the database. During this i go over the response request pattern. Finally the video wraps up with me creating a factory for building our message objects.
00:00:00 Creating New .Net Standard Library
00:00:46 Explination of SQL Reliance
00:01:19 Creating Database
00:01:45 Creating Tables
00:02:39 Filling Data
00:03:57 Showing Filled Data
00:04:30 Adding Sql User and Giving Permissions
00:05:35 C# Project Folder Layout
00:08:19 Adding Nugets
00:09:00 Adding EntityFrameworkCore Credential Model
00:16:36 Adding NotificationTypes Model
00:19:51 Database Context
00:24:11 Database Wrapper Service
00:25:31 Creating Internal Models
00:34:30 IDBService Credentials Method
00:36:31 Notification Response/Request
00:38:42 IDBService Notification Types Method
00:39:48 Implementing IDBService
00:41:15 Talking About and Implementing Func Ownd Database Context to control lifetime
00:43:10 DbService Constructor
00:44:43 Implementing GetCredentials
00:56:24 Implementing Get Notification Types
00:59:38 NotificationFactory Interface Creation
01:00:31 Notification Factory Models
01:07:17 INotificationFactory Method Creation
01:08:29 Implementing INotification Factory
01:09:26 Notification Factory Constructor
01:11:04 Build Message Implementation
Links
SQL Server Express
https://www.microsoft.com/en-us/sql-server/sql-server-downloads
SQL Server Management
https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms?redirectedfrom=MSDN&view=sql-server-ver15
Visual Studio Community
https://visualstudio.microsoft.com/downloads/
Knowledge Resource
https://support.teamunify.com/en/articles/227-email-to-sms-gateway-list
https://autofaccn.readthedocs.io/en/latest/integration/netcore.html
SQL
Create Table Credentials (
Id int IDENTITY(1,1) Primary Key,
UserName nvarchar(1024) Not Null,
Password nvarchar(250) Not Null,
Server nvarchar(250) Not Null,
Port int Not Null
)
Create Table NotificationTypes (
Id int IDENTITY(1,1) Primary Key,
NotificationType nvarchar(100) Not Null,
EmailFormat nvarchar(250) Not Null,
AcceptsHtml bit Not Null
)
insert into [Notification].[dbo].[NotificationTypes] (NotificationType, EmailFormat, AcceptsHtml)
values ('Email', '', 1),
('Alaska Communications', '@msg.acsalaska.com', 0),
('AT&T Wireless', '@txt.att.net', 0),
('Bell Mobility', '@txt.bell.ca', 0),
('Bell MTS', '@text.mts.net', 0),
('Bluegrass Cellular', '@sms.bluecell.com', 0),
('Boost Mobile', '@myboostmobile.com', 0),
('Cellcom', '@cellcom.quiktxt.com', 0),
('Chatr', '@pcs.rogers.com', 0),
('Consumer Cellular (AT&T)', '@mms.att.net', 0),
('Consumer Cellular (T-Mobile)', '@mailmymobile.net', 0),
('Cricket', '@mms.cricketwireless.net', 0),
('C Spire', '@cspire1.com', 0),
('Digicel St. Lucia', '@digitextlc.com', 0),
('Eastlink Canada', '@mms.eastlink.ca', 0),
('Fido', '@fido.ca', 0),
('Freedom Mobile', '@txt.freedommobile.ca', 0),
('FreeUP Mobile', '@txt.att.net', 0),
('GCI', '@mobile.gci.net', 0),
('Good2Go Mobile', '@txt.att.net', 0),
('Google Fi', '@msg.fi.google.com', 0),
('GreatCall', '@vtext.com', 0),
('H2O Wireless', '@txt.att.net', 0),
('IV Cellular', '@ivctext.com', 0),
('Koodo Mobile', '@msg.telus.com', 0),
('Metro PCS', '@mymetropcs.com', 0),
('Mint Mobile', '@tmomail.net', 0),
('Nex-Tech', '@sms.nextechwireless.com', 0),
('Page Plus', '@vtext.com', 0),
('PC Mobile', '@mobiletxt.ca', 0),
('Pioneer Cellular', '@zsend.com', 0),
('Pure TalkUSA', '@txt.att.net', 0),
('Republic Wireless', '@text.republicwireless.com', 0),
('Rogers Wireless', '@pcs.rogers.com', 0),
('SaskTel', '@sms.sasktel.com', 0),
('SIMPLE Mobile', '@mmst5.tracfone.com', 0),
('Solo Mobile', '@txt.bell.ca', 0),
('Spectrum Mobile', '@vtext.com', 0),
('Sprint', '@messaging.sprintpcs.com', 0),
('STRATA Networks', '@rinasms.com', 0),
('Telus Mobility', '@msg.telus.com', 0),
('Ting (CDMA devices)', '@message.ting.com', 0),
('Ting (GSM devices)', '@tmomail.net', 0),
('T-Mobile', '@tmomail.net', 0),
('Twigby', '@messaging.sprintpcs.com', 0),
('Ultra Mobile', '@mailmymobile.net', 0),
('Union Wireless', '@mms.unionwireless.com', 0),
('US Cellular', '@email.uscc.net', 0),
('Verizon', '@vtext.com', 0),
('Viaero', '@viaerosms.com', 0),
('Virgin Mobile', '@vmobl.com', 0),
('Virgin Mobile Canada', '@vmobile.ca', 0),
('Xfinity Mobile', '@vtext.com', 0)
This video is like C# Ui Academy, VetrivelD, and Programming with Mosh.
Comment with ideas for future streams.
Other Videos By CouchCmd
2021-06-23 | How To Mod Starbound from PC GamePass in Five Minutes or Less |
2021-06-21 | 7 Days to Die Glitch/Trick: Spear Gun |
2021-06-18 | Five Amazing Valheim Mods in Less than 10 Minutes |
2021-06-09 | How to Mod Valheim in Less Than Five Minutes |
2021-06-04 | Five Amazing Stardew Valley Mods in Less than 10 Minutes |
2021-06-02 | How to Mod Stardew Valley in Less Than Five Minutes |
2021-05-28 | How to Mod 7 Days to Die in Less Than Five Minutes |
2021-05-26 | How to Mod Among Us in Less Than Five Minutes |
2020-12-19 | C# Visual Studio Tutorial - Sending Messages Service Fabric Api Wrapper |
2020-12-12 | C# Tutorial - Advanced Messaging Library with Entity Framework, Response/Request, and D.I. Part-2 |
2020-12-06 | C# Tutorial - Advanced Messaging Library with Entity Framework, Response/Request, and D.I. Part-1 |
2020-11-28 | C# Visual Studio Tutorial - Sending Messages for Beginners |