لینک زیر نحوه ترکیب Repository با EF رو توضیح داده که البته ادامه داره و در پست های بعدی مطلب رو تکمیل و به روز کرده
http://huyrua.wordpress.com/2010/07/13/entity-framework-4-poco-repository-and-specification-pattern/
My road for the series is as follows,
RESTful Day #1: Enterprise level application architecture with Web APIs using Entity Framework, Generic Repository pattern and Unit of Work.
RESTful Day #2: Inversion of control using dependency injection in Web APIs using Unity Container and Bootstrapper.
RESTful Day #3: Resolve dependency of dependencies using Inversion of Control and dependency injection in Asp.net Web APIs with Unity Container and Managed Extensibility Framework (MEF).
RESTful Day #4: Custom URL Re-Writing/Routing using Attribute Routes in MVC 4 Web APIs.
RESTful Day #5: Basic Authentication and Token based custom Authorization in Web APIs using Action Filters.
RESTful Day #6: Request logging and Exception handing/logging in Web APIs using Action Filters, Exception Filters and nLog.
RESTful Day #7: Unit testing ASP.NET Web APIs controllers using nUnit.
RESTful Day #8: Extending OData support in ASP.NET Web APIs.
At Microsoft Build Live today, we are sharing a first look at our plans for .NET Core 3. The highlight of .NET Core 3 is support for Windows desktop applications, specifically Windows Forms, Windows Presentation Framework (WPF), and UWP XAML. You will be able to run new and existing Windows desktop applications on .NET Core and enjoy all the benefits that .NET Core has to offer.
Explore ASP.NET Core SDK and tooling, look at .NET Core CLI, and learn how to build an ASP.NET Core app with Razor Pages MVC. Plus, get the details on logging and diagnostics. Find lots of cross-platform goodness and get .NET ready, as you learn more about this framework for building modern cloud-based web apps. Build your first ASP.NET project, and gear up for the intermediate ASP.NET Core course.
catch (Exception ex) { StringBuilder errorMsg = new StringBuilder(); for (Exception current = ex; current != null; current = current.InnerException) { if (errorMsg.Length > 0) errorMsg.Append("\n"); errorMsg.Append(current.Message.Replace("See the inner exception for details.", string.Empty)); } // log errorMsg.ToString(); }
public static string ExceptionToString(this Exception ex) { StringBuilder errorMsg = new StringBuilder(); for (Exception current = ex; current != null; current = current.InnerException) { if (errorMsg.Length > 0) errorMsg.Append("\n"); errorMsg.Append(current.Message. Replace("See the inner exception for details.", string.Empty)); } return errorMsg.ToString(); }
catch (Exception ex) { // log ex.ExceptionToString(); }
To Update PM> Update-Package EntityFramework -Version 6.2.0 To install PM> Install-Package EntityFramework -Version 6.2.0
public class MyDbConfiguration : DbConfiguration { public MyDbConfiguration() : base() { SetModelStore(new DefaultDbModelStore(Directory.GetCurrentDirectory())); } }
/bin/Debug/MyAssembly.MyNamespace.MyDbContext.edmx
var appDataDirectory = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "App_Data"); //OR var appDataDirectory = AppDomain.CurrentDomain.GetData("DataDirectory").ToString();
Earlier this week, Microsoft published the roadmap for .NET Core 2.1, ASP.NET Core 2.1 and EF Core 2.1, expected to be out in the first quarter of 2018. The team also talked about several new features with this new release. This release is more of a feedback-oriented release based on .NET Core 2.0 release. The.NET Core 2.0 is a huge success and already more than half a million developers are now using .NET Core 2.0. All thanks to .NET Standard 2.0 release . In this post find out about the new features of .NET Core 2.1.