.NET Core: What is it?

aspnet-51.jpg

ASP.NET Core is one of the subsets of the .NET Framework that was earlier started with the Compact Framework Edition. Its major components include a small runtime from the code base of the .NET Framework CLR, although features like Application domains and Code Access Security are not included. With its unique features, .NET Core is likely to form the foundation of future .NET verticals as it is not specific to ASP.NET 5 or .NET native. It is designed such that the runtimes and Base Class Library (BCL) are general purpose and the format is modular. I know, that sounds so technical, right? We'll explain further...

The deployment is delivered as a set of NuGet packages as most of the library ecosystems are already established through the platform. It incorporates a number of technologies different from Native .NET since they run using the CoreCLR runtime that is compatible with several Windows platforms. It is also open source - incorporating Apache 2 and MIT licenses - and portable, but it is optimized to only use modules from its core library unless it is required by the application. However, the class libraries have been factored to remove dependencies which enables a user a much smaller set of libraries which run independently as a system.

The ASP.NET 5 workload, which is incorporated in the framework, has one special element in that it can run on multiple versions of .NET Core 5 such that two websites can effectively run on the same machine while on different - or similar - multiple versions of the .NET Core framework. This makes it suitable for quick downloads and for use even on devices with minimal storage capabilities. It is also easy to use on several software types such as Linux, and Windows, as well as Silverlight as its design is focused on keeping the deployment considerably smaller. It is easy to use on even non-Windows platforms meaning that the user does not have to worry about the software of their device.

This framework version uses a discrete group of reference assemblies that shows only that which is supported by the runtime. It is much easier to recognize this version as it has a limited number of features which makes it much more effective and easier to cruise. It is also friendly and allows a user to comfortably create and operate full-fledged websites on several operating systems; and is accessible on Windows Phone. With time it will be incorporated in more operating systems for access through additional platforms for a much better experience available for use on all kinds of devices.

At the moment, .NET Core is a framework for Linux and Mac, but some of the key features and libraries are missing. Before, it was impossible to create websites and RESTful application programming interfaces on Linux and Mac, but now it is easier with Visual Studio Code plus .NET Core and can also be made available for set up on Ubuntu.

.NET Core has proven to be the ultimate weapon for web developers to save on time and providing the best possible results and a more fun experience.

Our Nerds know .NET Core and can help you along the way if you need it. In fact, check out our services to see what else we can do for you! And feel free to contact us anytime. We love hearing from you.

Posted on January 20, 2017 and filed under Microsoft .NET, Other.

Creating a Custom Web Application: What You Need to Know

In as much as some expertise is required to develop and bring the application to life and afterwards maintain or improve it so that it generates profits enough to cover the expenses you used to invest in it, custom applications are not always difficult to create.

Basically, knowledge in programming languages, which can be accessed from several research resources and the internet through tutorials, will come in handy in ensuring that the application is functional and also help generate traffic so that it reaches a significant number of users.

Having a good idea puts you on the map and provides a foundation on which to begin the process. First, you need to know what kind of application you want to create and what impact it is going to have on its users. To design the best application, research a number of related web-based and custom applications and select one that appears most desirable and attractive to a greater number of users. For this to be a successful procedure, you will need to do fairly extensive research from as many platforms as you can access: books, the internet, and manuals or tutorials will direct you on how to proceed.

Now that you have narrowed down and identified the application you want to create, the second step is to work on database architecture as well as development for storage, data management, and information where users will fill in their credentials and use them to access the application. There are cloud-based software products that can be employed to provide the tools for organizing the graphics and texts. Additionally, they can be accessed easily from their websites at affordable prices.

Throughout the process, you are bound to make mistakes, but rather than looking at it as a failure, consider it a chance to learn new tactics that you could employ in future projects. Commitment is one quality you will have to embrace while working on creating the application and you will need to dedicate a lot of time and energy to the project. But it won't be long until you establish a process that works for you and begin to enjoy the benefits that will accompany a successful app.

With a few days to dedicate to your computer and keeping your research and reference materials nearby, you should be good to go. It is possible that at some point, however, depending on your knowledge and confidence levels, a developer may be necessary to enlist for help. A professional can guide you through the programming languages in case you are not as conversant with the framework and how they operate as may be required.

Even if you you are keen on flying solo and follow your plan to the letter, you may need some expertise if you want to come up with a custom application without compromise and the exact functionality and design that you desire.  Only you know the level of functionality and general purpose of the application, as well as your abilities. There’s no shame in bringing in an expert who does this for a living rather than compromise quality or functionality.

Whether you are building your own app or would rather just hire a professional to do it, Extra Nerds would be happy to help guide you through the most challenging pieces or the entire process. Our Nerds are experienced, knowledgeable, creative, and accessible. Check our our available services, portfolio, or credentials and contact us to see what we can do for you.

Posted on December 16, 2016 and filed under Other.

Why Are Companies Increasingly Outsourcing Web and Application Development?

Application development, both for the web and for smart technology, has become a major source of revenue for companies around the world. Although completed applications can provide high revenue, they require quite a bit of time and money to develop and to properly test. Since companies are always researching methods to reduce operational burdens, outsourcing web development has become a common practice.  Not only is the original product time-consuming to create, but most web app development continues long after it has launched. Constant updates are needed to keep the application running and up to date and occasional bugs are common threats to any type of software. Consumers want updated and feature-laden applications, so skimping on development and maintenance really isn’t something that can be avoided by companies using applications as part of their business model.

The problem, then, becomes finding people who can work full time on app development and to maintain control over any ongoing issues in an affordable, timely, and efficient manner. Businesses don’t always have the resources to retain an entire staff for this purpose and that’s where outsourcing becomes a valuable alternative. Certainly, some research should go into selecting possible contractors or contract companies to hire so that the right people are put on the project. Checking reviews or testimonials is a recommendation. 

Oftentimes, it is easier and smarter to pay contract developers who have their own hardware and software than to purchase your own and then hire someone or have someone trained on how to use it. It can also be daunting to manage in-house development projects and might be better to just leave it in the hands of someone whose sole job it is to keep up with the industry and who knows the right questions to ask to give you what you want. You still maintain control over the product, but have a field expert doing the technical work. If you have the opportunity, it is always beneficial to have a project manager as the liaison between you and the developers. This ensures accurate and consistent communication, the establishment of a timeline and deliverables, and a clear mutual understanding of expectations. To read in more detail about the benefits of having a project manager, check out our blog series on the topic.

Generally speaking, outsourced labor can be more cost effective in addition to yielding better results, and is ideal for companies that need to quickly launch their applications in order to generate a profit to cover operating costs. Not only do contractors have their own equipment and programs, but they don’t need you to pay for ongoing training, nor do they require benefits or paid leave. Not that we’re against employee benefits in general, but technology moves so fast these days, it can be really beneficial to outsource that piece of your workforce.

In short, outsourcing is a viable choice for companies looking to decrease costs and increase the value of their applications. As the world becomes more connected, it’s only natural to want to tap into the global market. Application development is certainly one way to do that and hiring a reliable and professional team to do that for you could prove invaluable. And of course, Extra Nerds can offer you a project manager and highly skilled developers to see your software, website, or application development project from fledgling idea to fruition and even provide ongoing maintenance.  (C’mon, you knew we were going to close with a shameless plug, didn’t you? But we wouldn’t do it if we weren’t sure that we were right. Let us help you and your business attain awesomeness; you won’t regret it!)

Posted on October 7, 2016 and filed under Domestic IT Outsourcing, Other.

When do I build my own web app versus hiring a freelancer?

When do I build my own web application versus hiring a freelancer? That is a common and important question for many business owners who want to integrate a digital presence into their marketing or operations. Ironically, the mere fact that you are presenting the question, probably gives you the answer. But, let’s talk about it in more detail. It really comes down to three issues – time, cost, and expertise.

Many persons instinctively like the idea of building their own app because, of course, why wouldn’t they.  We all think about owning our resources and controlling costs as much as possible.  Logical, right? The problem is that there are many hurdles one must overcome in order to build a web app. First, you would have to learn the process if you do not already have that knowledge. When you are considering an app design, several questions arise: ‘Will the app be simpler to use than a web page?”, ‘Will the app feel like a complete product?’, ‘How does the web app make my operations more proficient?’ and so on. Several key elements will stand out in response to these questions - namely efficiency, speed, and simplicity.  Any professional software specialist will tell you that it takes a certain level of experience to design an app that can meet all these necessary criteria. Acquiring that level of skill can take time, not to mention the time it takes to properly build the software. This is time which you may not have to dedicate if you are a business owner or manager.

Another common consideration is cost. Is it worth it to spend a bit to get the quality and expertise of a professional? While it is understood that folks need to watch their budgets, it would be wise to include an allocation for technological marketing; this is not an area in which you want to skimp, especially in this day and age. First, if done well, a web app will pay for itself pretty quickly – called a return on investment (ROI) – in increased exposure and sales in addition to presenting a professional image. A poorly designed app can be detrimental these days.

In order for any app to be successful, it is essential that it be coded well. An obvious statement, yes, and yet sometimes people downplay this fact in favor of saving on cost or because they just don’t realize the intricacies involved. This can lead to disastrous consequences and can end up costing more in the long run when you lose business and have to pay a professional to fix the mistakes. Let’s say that you have some basic knowledge in coding and you want to design your own app. The web app that you are creating might contain redundant lines of code as can happen when folks are less experienced; it could also include coding errors or other unforeseen issues, all of which will make the app slow and ineffective and may even causing it to crash on its intended users. 

Now let us say that you’re decent at coding and manage to avoid potential pitfalls. Then you encounter the Graphical User Interface (GUI, pronounced “gooey”), which is a type of user interface that allows users to interact with devices through graphical icons and visual indicators rather than text-based interface or text navigation and is an important part of application programming. Basically, it deals with how the elements are set up on the app page. This is a major factor as to why people prefer some apps over others – an app cluttered with elements or an app which his too sparse can be a deterrent for potential users. While coding makes the app efficient, GUI makes the app simple to use and gives it a sense of completion and a final product.

A good software developer will make you feel comfortable during the design and development process, communicating often, so that you can share your vision and they can bring it to fruition. These folks do this for a living and they understand the fundamentals of design and performance optimization; they have the time, the flexibility, the training, the experience, and the expertise to do it well. And, in many cases, they can even advise on the launch and post-launch marketing utilization strategy as well as offering ongoing maintenance and support.


Many people take it upon themselves to design and maintain their own web app and then wonder why they don’t acquire the traffic or usage they anticipated. One cannot successfully market a poorly performing web app because user reviews will deflate any attempts to do so and negate any cost savings there may have been.  Simply put, it is far better to utilize a freelance programmer’s comparative advantage and expertise to create a valuable product and save yourself some much needed time, effort and, in the long run, money.

Speaking of hiring expert freelancers, Extra Nerds would be happy to discuss with you any needs you have for building a website application. This is what we do and we do it well. We’d love to help you to turn your vision into a reality! Contact us anytime for a quote or to discuss our variety of services.

Posted on July 1, 2016 and filed under Domestic IT Outsourcing.

What's Going on Lately with Microsoft.NET?

Microsoft's.NET is the programming framework created by Microsoft for developers to easily create applications and web services. A programmer can choose from a selection of codes in the library of the .NET framework that can be utilized without having to write it.

Microsoft decided to open source most of the .NET framework last year and it has been keeping the promise in the latest version of the .NET framework which is in the news for open source and cross platform features.

The latest release contains the RC2 of the.NET Core run-time and libraries. The programmer requires having these files simply in his folder to run an application. Programmers who are comfortable with run-time will be able to move ahead with their projects until ASP.NET Core tools are completed.

Many developers are facing compatibility issues of existing projects with the new update. Hence, Microsoft has decided to provide guidance to developers who are facing compatibility issues with the .NET framework programming model. They have also advised programmers to target the new platform when running new projects and to upgrade old projects to new framework only if necessary.

Compatibility issues are reduced by running on the newer platform by leaving the targeted .NET framework version unchanged for an app. The newer versions of the platform are better to work on because any compatibility issues in the older versions in the subsequent release of the 4.x releases. It is also advisable to upgrade to the latest version from any previous versions of the .NET framework.

It is suggested that the developer run the app on any of the .NET framework on which he thinks the app will run. The programmer should make use of API Portability Analyzer and .NET Framework Compatibility Analyzers to find out problems areas in his app. With the help of these compatibility switches, the developer will be able to leave out the features of the app that are causing a problem while upgrading to the latest version of the .NET framework.

Developers should also need to test applications if it is built with newer compilers. A slight change in the C# and the Visual Basic compilers that cannot be fixed but do not trouble in run-time. Developers must be intentional while building apps because of the change in the compilers.

The release of the RC2 is an exciting step in the information technology industry as it is a significant step forward for Microsoft’s cross-platform.NET. This plays a crucial role in the company’s plan for Windows Server 2016 to roll out. Smaller and faster .NET applications will fit the micro-services and containers. The Exchange Server 2016 messaging server is still not supported with the Windows Server 2016, Microsoft’s latest emerging product still in the preview stage. Windows Server 2016 is said to be released later this year and that’s when it will support the Exchange Server 2016.

For Windows, users and developers need to migrate to the latest version of the latest framework which is open source and works cross-platform will now run with lesser compatibility issues with your applications once you have updated to the latest version of the framework.

Hopefully this post has been helpful in identifying some of the benefits of using .NET. If Extra Nerds can help you and your business with any such services, be sure to contact us for a quote!

Posted on May 20, 2016 and filed under Microsoft .NET.

Nerdy Newsletter: November, 2015

Client Highlight: King Family Farm

King Family Farm officially began in 2002, though the founders have been involved in agriculture their entire lives. Both JB & Charlene have ancestors from southeastern Ohio who were involved in agriculture, some since the 1800s, so their roots run deeply. Still, they felt the effects of a fluctuating market. Through innovation, however, they persevered and became successful. As their business continued to grow, they contacted Extra Nerds to modernize their website, including the addition of e-commerce capabilities. We're so glad to see a local business grow and succeed and we're proud to be a part of it in our own small way.

Meet a Nerd

nick.png

Nick Bauer, our Design Nerd, has over 13 years of experience in the design field ranging on work for small businesses to work on billion dollar brands for Procter & Gamble. He is a ‘Jack of All Trades’ Designer who works in various medias on and off the computer. Nick has a Bachelors of Fine Arts degree from Miami University and lives just north of Cincinnati with his wife and daughter, where he sits as a board member on the City of Sculpture for Hamilton, Ohio.

When he's not working hard being a Nerd, he's creating metal sculptures or furniture and playing indoor soccer. It's great to have such a talented and diverse designer on our team!

Become a Nerd

Extra Nerds is always looking for folks to add to our team. Do you have interest in becoming a part-time developer with a background in .NET and SQL Server? Our preference is for someone with knowledge of MVC, Entity Framework, and WebAPI. Javascript and CSS experience is a plus. Check out our website and if you're interested in joining our team then give Sid McFarland a call at 740-249-2200.

Extra Rewards

Be sure to take advantage of the Extra Nerds Referral Program. For every person or company you refer to Extra Nerds, you receive 1 FREE hour of development from one of our specialists. Not a bad deal, right? Spread the love!

Posted on November 6, 2015 and filed under Nerd Newsletters.

Using Microsoft’s Entity Framework: Part 6 of 6

Reduced Development Time

In the first blog in this series, we provided a comprehensive introduction to Microsoft's Entity Framework. Going forward, we addressed the creation of custom web applications, and creating a data access layer. In the next post, we went into identifying a couple of the more common EF issues and how to troubleshoot them while the most recent installation taught us about creating a scaleable application. For our final post, we’ll talk about how EF can actually reduce development time.

The beauty of Entity Framework is the way that it reduces development time when you launch a new project. It has done a great deal of the preliminary work for you by reducing the time required to write the data access layer. Not only that, but you can save time down the road when revisions or modifications must be made.

If you have dealt with systems that degrade over time, the results being slow and inaccurate, you realize how the handling of data can make or break a system. The Entity Framework allows developers to manipulate conceptual objects, such as products, messages, etc. This mapping ability allows developers to store data efficiently. Working between a database and code can be time consuming and can provide yet another area for errors. However, Entity Framework has taken that part of the work and prepared it in advance.

Not only does this system make programming easier and faster, but it allows for portability since changes in the database software require a mere change in the mapping software interface rather than in the code itself. By steering clear from a database model and using objects instead, you can design a system conceptually, thereby saving time and gaining flexibility. By layering your software, you can use business logic throughout the model so that each layer of code performs its own function, thus separating the needs and concerns along the way. This approach, with separation built in, creates a defined method of organizing or modeling the system according to the needs.

SQL is a time stealer that takes energy and time and hides it away, never to be found again. While many developers have grown to understand SQL deeply and are very comfortable with it, there are others who may not have a thorough understanding when it comes to using SQL for complicated scenarios. A little mistake or a line of code that is not optimized can create issues that cause problems down the road. Not only that, but troubleshooting can be difficult. These issues can come up even for experienced developers.

When one has new developers, the use of Entity Framework would be much more time effective and less susceptible to mistakes. By using the higher level language, you can write a query and allow the Entity Framework to generate the ideal SQL commands quickly and accurately. Not only is the work done for you, but it is easier to document and read the code. This not only saves you money and time now, but can save a great deal of effort down the road when modifications are necessary. Imagine being able to go into a layer of code and merely make the changes necessary there without delving into the data interface layer.

By moving away from database-first systems, you can lean on a higher-level tool that can allow you to grow and expand to more complex application scenarios without 'reinventing the wheel' every time you take a step in a new or expanded direction.

Posted on October 23, 2015 and filed under Using Entity Framework.

Using Microsoft’s Entity Framework: Part 5 of 6

Creating a Scaleable Application

In the first blog in this series, we provided a comprehensive introduction to Microsoft's Entity Framework. Going forward, we addressed the creation of custom web applications. The third outlined creating a data access layer and the fourth was really helpful in identifying a couple of the more common EF issues and how to troubleshoot them.

So, now that you have some understanding of how Entity Framework actually works, you are ready for the next step in understanding why this is such a positive solution for your business. So how does Entity Framework allow developers to create a more robust and scalable application? Without getting too technical, an example is probably the best way to show you just how useful this can be.

Generally, when you are using a database there is a great deal of tedium involved in constantly adding new information, making sure it falls into the right categories and writing the particular language to keep things up to date. As we’ve discussed, Entity Framework is an open source framework provided by Microsoft that does a great deal of the busy work for you.

Let us take a moment to look at an example that may be used by a school. The school is the domain in which everything is stored within the database. As students rarely make a career out of going to high school, the database is constantly changing and each student has their own particular attributes that need to be tracked. These attributes can vary from GPA to days missed to the type of classes they are taking. To keep this information updated traditionally, a great deal of language would need to be updated each time to create an accurate database. With Entity Framework, the attributes are added to each student and the framework does the busy work to make put them in the right areas of the database.

This allows you to create classes with different connection with much more ease and at a faster rate. While the code generator in the framework may not be as robust as what will be written by an engineer, once the groundwork is done, Entity can handle the rest with ease.

In addition Entity offers T4-like template code generation. With predefined templates that can generate code in C# or Visual Basic for the model that can support persistence aware and persistence ignorant entities. It also supports validation framework for entity property values validation MVC Controller and views, Data Annotations metadata classes and a wide variety of other technical aspects that in short, makes life easier for everyone involved in a project.

You will also have the option to update to and from database with wizards that allow you to synchronize with ORM models in any direction automatically. A wide variety of mapping is supported as well, from entity to table, table splitting and complex types just to name a few. Unlike EDM designer Entity does not require manual XML code editing regardless of how complex it may be.

While this is a very high level overview of what is on the table when it comes to incorporating Entity Framework into your business, it is paramount to understand that this was designed to make a developer’s job much easier. It succeeds at that in spades and the fine folks here at Extra Nerds will be happy to discuss how we can help with your next project.

Stop back next week for our sixth and final installation in this series which will tell us how Entity Framework reduces development time.

Posted on October 16, 2015 and filed under Using Entity Framework.

Using Microsoft’s Entity Framework: Part 4 of 6

How to Troubleshoot Common Issues

Continuing from the first parts of the series when we provided an introduction, a follow up on creating web applications, and a third on creating a data access layer, this fourth installment will be detailing the troubleshooting of common problems that may be encountered during the Entity Framework process. This will help those who are constantly encountering issues from the Microsoft program, a process that is often very frustrating and in some cases, difficult. Here is a basic guide which some may find to be helpful.

Troubleshooting Tips

There are various things that can go awry when using Entity Framework. Rather than going through all of them, I will address the most common problems and remedies. Below are what I found to be the most consistent problems, as well as the highest source of complaints for those using Entity Framework.

Cannot Connect to a Database. For those who have gotten this error message, chances are you were unaware on how to handle it. That’s alright as clear instructions for dealing with these cases have not been readily available. So, how do you troubleshoot this problem? First, look into the connection settings that you have tied with the framework. Once you have found the connection hotspot, you will be able to tell the exceptions connectivity. Once a connection is found, it is recommended that you run a “debugger” to find the full source of the problem. After you have run the debugger, though absent of an exact code or configuration, the Entity Framework will most likely actively try to connect to a local SQL Server Express database that should be available. Through a quick configuration test, you can find the source of the problem, which 99% of the time is related to the absence of LocalDb. Install LocalDb and, once installed, choose to connect to this, rather than the SQL Server Express, and you should find that these connection problems are removed.

Cannot Attach to Deleted MDF File. Another common problem for those using Entity Framework is the inability to attach to a deleted MDF File. When those using SQL LocalDb delete files, the process is only completed when they use Object Explorer in Visual Studio, or in other cases, SQL Server Management Studio. The reason for this error is simple: the database of the file is still tied to LocalDb. Luckily, the solution is just as simple as the problem. You simply need to go to Object Explorer, find the file then delete it from this location. SQL servers should then recreate the files that were once deleted so that you can attach any additional information.

In Conclusion

These are certainly not the only problems that you could encounter, but they are generally the most common. For any other problems, just know that they are usually rooted in the database or in the connection of the files. Of course, other methods do exist to fix these problems, but for now these are the most simple and painless.

In our next post in this series, we’ll outline how Entity Framework allows developers to create more robust and scaleable applications so stay tuned!

Posted on October 9, 2015 and filed under Using Entity Framework.

Using Microsoft’s Entity Framework: Part 3 of 6

How to Create a Data Access Layer

As we mentioned in the introductory blog in this series as well as the post on creating custom web applications, Entity Framework (EF) is an object-relational framework (ORM) that is Microsoft's recommended data access technology usually on new .NET applications development. Basically, it allows the developer to work easily with relational data using domain-specific objects and without hard code database access. With my experience in building .NET applications, I'll be showing you how to create a data access layer using Entity Framework.

To create the entity data model (EDM) or the conceptual model for the entities of your domain, EF provides three models including model first, database first and code first. With the code first and model first approaches, it's assumed that a database schema is created based on the model you also need not have an existing database as you create your application. This is because database administrators (DBAs) are responsible for designing and maintaining database within enterprise environments and not the developers. In this post, we take a look at the database first option where the entity data model becomes a virtual reflection of the database or any of its subsets.

CREATE TABLE [dbo].[Department] (
[DepartmentId] INT IDENTITY (1, 1) NOT NULL,
[Name] VARCHAR (50) NULL,
PRIMARY KEY CLUSTERED ([DepartmentId] ASC)
);

CREATE TABLE [dbo].[Employee] (
[EmployeeId] INT IDENTITY (1, 1) NOT NULL,
[DepartmentId] INT NOT NULL,
[FirstName] VARCHAR (20) NOT NULL,
[LastName] VARCHAR (20) NOT NULL,
[Email] VARCHAR (50) NULL,
PRIMARY KEY CLUSTERED ([EmployeeId] ASC),
CONSTRAINT [FK_Employee_Department] FOREIGN KEY ([DepartmentId])
REFERENCES [dbo].[Department] ([DepartmentId])
);

The N-tier architecture

Normally, large enterprise applications will require more than one database to store their data and a data access layer (DAL) to read the databases. Repositories may also exist to communicate with DAL, business layer for logic, classes for business domain, service layer for displaying the business layer to the clients and finally a user interface such as ASP.NET application which I normally use in my case or a WPF desktop application.

Creating Data access layer (DAL)

1. Start by creating a new C# class library example (Mm.DataAccessLayer) and add an ADO.NET Entity Data Model. This is how I like to start off. In the Entity Data Model wizard, choose "Generate from database". The wizard allows you to connect the database selecting the Department and the Employees to be included in the model.

2. In order to separate entity classes from EMDX which is vital separation is of importance, add a new class library (Mm.DomainModel) using visual studio, my favorite to the solution.

3. Open the File Explorer and move the Model.tt file to your new project. folder.

4. Include Model.tt file back in Visual Studio in the created project by clicking   
"Include In Project" option on the "Show All Files" icon.

5. Delete Model.tt file from DAL project.

6. In the Model.tt template file, set the inputFile variable to point to an explicit path
where to find the model.

As Follows: const string inputFile = @"../Mm.DataAccessLayer/Model.edmx";

Right-click on your Model.tt template and choose the "Run Custom Tool" to regenerate and reflect the latest changes to that model.

7. As you well know, the context by default expects the entity classes included in the same namespace. For their new namespace you need to add a using statement to your Model.Context.tt template file of your DAL project.

using System;
using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using Mm.DomainModel; <!-- Added -->
<#
if (container.FunctionImports.Any())
{
#>
using System.Data.Objects;
using System.Data.Objects.DataClasses;
using System.Linq;
<#
}
#>

8. All you need now is to add a reference from your DAL project to the domain model project and compile it.

Hopefully this post has been helpful to you in creating a data access layer. The next installment in the Microsoft Entity Framework series will concentrate on troubleshooting common problems.

Posted on October 2, 2015 and filed under Using Entity Framework.