Click here to Skip to main content
15,897,334 members
Articles / Web Development / HTML

Design and Develop a website using ASP.NET MVC 4, EF, Knockoutjs and Bootstrap : Part - 2

Rate me:
Please Sign up or sign in to vote.
4.92/5 (74 votes)
13 Jan 2013CPOL10 min read 219.3K   15.7K   168  
Design a website architecture that must be simple, easily understandable by any web designer using asp.net MVC, EF, Knockoutjs and Bootstrap

using System;

namespace Application.Core.ProfileModule.AddressAggregate
{
    /// <summary>
    /// This is the factory for Address creation
    /// </summary>
    public static class AddressFactory
    {
        /// <summary>
        /// Create a New Address
        /// </summary>
        /// <param name="line1"></param>
        /// <param name="line2"></param>
        /// <param name="city"></param>
        /// <param name="zipCode"></param>
        /// <param name="createdBy"></param>
        /// <param name="created"></param>
        /// <param name="updatedBy"></param>
        /// <param name="updated"></param>
        /// <returns></returns>
        public static Address CreateAddress(string line1, string line2, string city, string state, string country, string zipCode, string createdBy, DateTime created, string updatedBy, DateTime updated)
        {
            Address objAddress = new Address();

            //Set values for Address
            objAddress.AddressLine1 = line1;
            objAddress.AddressLine2 = line2;
            objAddress.Country = country;
            objAddress.State = state;
            objAddress.City = city;
            objAddress.ZipCode = zipCode;
            objAddress.Created = created;
            objAddress.CreatedBy = createdBy;
            objAddress.Updated = updated;
            objAddress.UpdatedBy = updatedBy;
            
            return objAddress;
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions