Skip to main content

Posts

Models In Asp.net MVC

What is a Model? Model is a class that represents domain specific data and business logic in a dot net application. Adding A Model  Right click the Models folder in the solution explorer->Add -> Class After that Select Visual C#-> Class  and provide a suitable name for your model class Sample Model Class In Model validation logic can be added using Attributes in C# . Some validation attributes like StringLength,RegularExpression are used in the model.

Getting Started With ASP.NET MVC First Application

Requirements: Visual Studio (i am using VS 2017 for demo) Open up the visual studio and Click File -> New ->Project   Click Visual C# -> Asp.Net Web Application (.NET Framework)                                              In the Name i.e Project Name and Solution give the name as required here I have given      Name: WebApp                                                                                                                              Solution Name: StudentInformation Select MVC and then click OK The applicati...

Introduction to ASP.NET MVC

What Is Asp.Net MVC ?  Asp.net MVC is a framework introduced by microsoft in 2008 for building web application. Asp.net MVC is an architectural pattern built on top of ASP.Net Framework for development of application based on three main logical components. Asp.net MVC is lightweight and testable framework and can be used to develop highly scalable and extensible enterprise level applications. Three main components of MVC 1. Model   Model is a data specific logic that the application works with.It generally represents the data that is transferred between storage layer and application and between view and controller. In general Model is a class that contains properties specific to the application domain and transfer data between different components. 2.View View is an user interface that can use model to populate data to the users. They are results of the request made by an user to the application and is returned from controller. 3. Controller Controller is a compon...

Introduction to Microsoft SQL Server

Microsoft SQL Server is a Relational Database Management System(RDBMS) developed by Microsoft. It is one of the most popular RDBMS. SQL server has evolved from sql 1.0 in 1989  to the latest release of SQL Server 2019 (preview)  to become one of the best enterprise level database server's. SQL server is released with different editions. Express: Free to use entry level database which can use 1 core cpu, 1 GB ram and have maximum size of 10GB. Compact : Free embedded database for mobile app development and can have maximum size of 4GB. Enterprise : Full featured top end edition. Standard : Have less features than enterprise. WorkGroup: suitable for a company to use among the group. Developer: Same features like enterprise but is  licensed  to one user only. Web: Specially targeted for web application There are some other editions like Datacenter, Enterprise evaluation and Business Intelligence. These all editions are not available on all version o...

Update column with data from another table in SQL

  At different point of time we come up with a situation  where we need to update a column in a table from another  table based on some condition.   So a Basic Syntax for update is: UPDATE table SET column1 = expression1, column2 = expression2, ... [WHERE conditions]; For us to update based on another table we will be using the same syntax for update applying join with another table from  where we need the data. UPDATE t1 SET t1 .column_to_update = t2 .column_from_update FROM Table1 t1 INNER JOIN Table2 AS t2 ON t1 .common_column = t2 .common_column

Configure DNS to use an external mail server in Windows Server

External mail server can be used in the hosting server by configuring Mail Exchange ( MX ) Record. The Domain Name System(DNS) has several types of resource records that full fill the name to ip address translation(Directly or indirectly). One of the widely used record is MX Record.        An MX record should return the fully qualified domain name of an email server and its preference value . MX Record can be configured by following the step below. 1. Open DNS Manager 2. Add A Record for your mail          (eg: mail.domain.com with the ip address of another server) 3. Add  MX Record and set FQDN  to the name assigned in A Record           (i.e mail.domain.com)      Preference number can have any value between 0 to 65535 and lower number sets for higher            priority. After completing this step, The mail server is pointed to the ip add...