What is the Entity Framework in asp.net ? Part #1


What is the Entity Framework?

• Entity Framework (EF) is an object-relational mapping (ORM) framework for the .NET Framework.
• It abstracts the relational (logical) schema of the data that is stored in a database and presents its conceptual schema to the application.

History

• Entity Framework (EFv1) was included with .NET Framework 3.5 Service Pack 1 released on 11 August 2008
• The second version of Entity Framework, named Entity Framework 4.0 (EFv4), was released as part of .NET 4.0 on 12 April 2010
• A third version of Entity Framework, version 4.1, was released on April 12, 2011

Advantages

1.Basically the Entity Data Models that are built using the Entity Framework. It is going to be the centerpiece of communications with several technologies.
2.This enables developers to “model” the data for their application without changing the actual database

For more details of this topic, please read this article

Why use the Entity Framework?
Entity Framework
When to use EF?

Advertisement

How to make cross browser compatibility of website?


Hi
Some many time, while developing web based project, It will look proper on one browser,but it doesn’t look proper on other browser. I had faced this problem so many time.

Here is some free tools which will help to check the XHTML and CSS standards.

If we don’t follow this standard then it will not look proper on all browser.

To validate HTML and XHTML
http://validator.w3.org/

To validate CSS
http://jigsaw.w3.org/css-validator/

How to generate random password in asp.net?



Hi
So many time, we will get requirement to send the random password to the users in asp.net project.

Here is the simple code to do this task
step1: Create one class in app_code file and write this method there

public static string GetRandomPassword(int length)
{
char[] chars = “$%#@!*abcdefghijklmnopqrstuvwxyz1234567890?;:ABCDEFGHIJKLMNOPQRSTUVWXYZ^&”.ToCharArray();
string password = string.Empty;
Random random = new Random();

for (int i = 0; i < length; i++)
{
int x = random.Next(1, chars.Length);
//For avoiding Repetation of Characters
if (!password.Contains(chars.GetValue(x).ToString()))
password += chars.GetValue(x);
else
i–;
}
return password;
}

Step2: Call the method in asp.net page like this

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

Label1.Text = PasswordGeneration.GetRandomPassword(10).ToString();

}
}

Free web Template


Hi
Here is some nice open source HTML template, which one we can use in asp.net dynamic project.

http://opensourcetemplates.org/
template kingdom
website templates online

Free Html 5 template using Bootstrap

http://www.nextdesignweb.com/2014/05/50-Free-Bootstrap-HTML-Templates.html
http://www.gettemplate.com/

30 Free Responsive HTML5 CSS3 Templates


http://www.html5admin.com/demo/

For admin Panel

http://w3lessons.info/2014/05/16/free-responsive-bootstrap-admin-templates-2014/

How to align the Multiple Div using CSS ?



Hi
So many time, we will get the alignment problem of div. Here is the complete css code for Div alignment.

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Div.aspx.cs" Inherits="CSS_Test_Div" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;

<html xmlns="http://www.w3.org/1999/xhtml"&gt;
<head>
<title>Aligning Multiple DIV's using CSS</title>
<style type="text/css">
.divOuter {
display:inline;
text-align:center;
}

.divInner1, .divInner2, .divInner3
{
border: 1px solid;
float:left;
width:150px;
height:150px;
margin-left:3px;
margin-right:3px;
}
</style>
</head>
<body>
<div class='divOuter'>
<div class='divInner1'>First DIV</div>
<div class='divInner2'>Second DIV</div>
<div class='divInner3'>Third DIV</div>
</div>
</body>
</html>