zzz projects NMemory Database
Home
Getting Started Release Notes Knowledge Base  Help & Donate
Online Examples
  • Home
  • Getting Started
  • Release Notes
  • Knowledge Base
  • Help & Donate
  • Online Examples
  •   Download  

NMemory Database - Knowledge Base (KB)

27 results in tag: c#

Unable to use existing database in unit tests with Effort framework

I am trying to write test using a database, hosted in Azure SQL, with ...Effort... framework on Entity Framework 6....When executing the following code, an exception is thrown: ...[ClassInitialize] public static void ClassInitialize(TestContext context) {...
c# effort entity-framework entity-framework-6 unit-testing
asked by Lena Kaplan

Effort Framework does not recognize Entity Model schema

I have an entity model of a Sybase ASE database and I am trying to use the ...Effort Framework... to create unit tests for it. I am able to access the database with the entity model in both my main project and unit test project, however when try to use Ef...
c# effort entity-framework-5 sybase-ase unit-testing
asked by elliot-j

What's the correct way to use Effort with Entity Framework 6?

I'm trying to get some test code working using the Effort data provider with Entity Framework 6. What I'm trying to do seems like it should be the absolute simplest use-case, but I'm just not able to get things to work....Here is my DbContext class: ...p...
c# effort entity-framework entity-framework-6 linq
asked by Tim Long

Effort Unit test: Argument 'xmlReader' is not valid

I'm currently trying to unit test a context class of the Entity Framework with the "Effort" framework (...http://effort.codeplex.com/wikipage?title=Tutorials&referringTitle=Home...)...If my unit test project has two classes that contain methods use effort...
c# effort unit-testing
asked by rawajames

Using Migrations with Effort.EF6?

I'm using EF6 and I'm now setting up some tests for my aggregates. I've decided to use Effort.EF6 because I'd like to have those tests run without having to install an entire database engine....My DbContext uses migrations and a seeding method that insert...
.net c# effort entity-framework-6
asked by Maciek

How can you perform the same tests as Effort using only Moq?

Presently, I have setup a lot of tests including data access layer and business logic layer tests using Effort (see ...https://effort.codeplex.com/...). We have already been using Moq in our unit tests, and my boss would like to keep things simple, so he...
c# effort entity-framework-6 moq unit-testing
asked by user8128167

Testing with Effort and TypeName attribute

I'd like to test some code, and to achieve that, I'd need to fake DbContext defined in DAL (...Entity Framework 6 - Code first...). It's going mostly well, but I bumped into an problem when the data model class is using the ...TypeName... attribute. I mad...
c# dbcontext effort entity-framework unit-testing
asked by Szeki

Effort throws InvalidOperationException: Sequence contains more than one matching element

I'm using Effort in a regular way by creating a connection and passing it to DB Context:...public class InMemoryContextInitializer { public void BeforeAllTests() { Effort.Provider.EffortProviderConfiguration.RegisterProvider(); } ...
c# effort entity-framework
asked by yǝsʞǝla

How do I get Effort to work with EntityFramework?

OVERVIEW... Using Fitnesse with EF6, can't get Effort to start up. I've tried every trick in all the posts I can find.... All the posts say to either call 'RegisterProvider', or add a config section. Neither is working....So far:... I have "Effort.Provid...
c# effort entity-framework
asked by BWhite

Unenforce foreign key references in Effort

I am using Effort in Visual Studio and C# to recreate and unit test a database. I am writing a class for a single table and so I am only populating the database with objects from that table. My problem is that the Effort database wants the object's foreig...
c# effort
asked by A_Arnold

Why Since Adding Effort.EF6 Unit Tests can I no longer run my C# MVC Website?

My C# MVC Website uses StructureMap for Dependency Injection....The constructor for my DbContext used to be as follows....public class PortalEntityModel : DbContext { public PortalEntityModel() : base("name=PortalEntityModel") { } } ...Now I h...
asp.net-mvc c# effort entity-framework structuremap
asked by Tom McClean

Unit Test with Effort EF6 with Async Methods

I'm trying to setup Unit tests for this. But every example I've seen that actually works is this type of setup. It will work this way....//Setup DBContext public MyContext(DbConnection connection) : base(connection, true){} //Have some service that gets p...
c# effort entity-framework entity-framework-6 unit-testing
asked by KryptoBeard

EntityFramework, DbContextScope and Effort - exception: DbContext has been disposed inside unit test

I am trying to write unit tests (with NUnit) for service layer which uses:...Entity Framework as Data Access Layer...DbContextScope... for managing DbContext lifetime...I also use ...Effort.EF6... for mocking DbContext in unit tests. Unfortunately, I cann...
c# dbcontext effort entity-framework unit-testing
asked by PJDev

Effort Entity Framework Sequence contains not matching elements

So I've been trying to setup Effort and am not having much success. Looking on their site and people's comments it looks pretty straightforward. ...I started small because I just wanted to test if it works. The error I get is "Sequence contains no matc...
asp.net-mvc c# effort entity-framework
asked by user892381

Spatial DbGeography Provider exception with Effort.EF6 [No usable spatial provider could be found.]

I'm developing an application with EF6 and I decided to use System.Data.Entity.Spatial.DbGeography for my locations as follows...public class Place { public int Id { get; set; } public string Name { get; set; } public DbGeography Location { get; se...
asp.net-mvc c# effort entity-framework-6 spatial
asked by nramirez

Update model causes interface to be removed from DbContext when using Effort with Entity Framework

Presently, I am attempting to use Effort (...https://effort.codeplex.com/...) with my Entity Framework 6 solution to allow unit testing without requiring a database connection (see ...http://www.codeproject.com/Articles/460175/Two-strategies-for-testing-E...
c# effort entity-framework-6 unit-testing
asked by user8128167

Effort unit testing Entity framework 6.1.3 DB-first

I am experiencing problems when using Effort framework (version 1.1.4) to unit test my DB-layer....I have a DB-layer using Entity framework 6.1.3 and the model is created using database-first approach so there is an ...*.edmx... file describing the model....
c# effort entity-framework unit-testing
asked by gurkan

Effort- FirstOrDefault returns null when Faking Database

I'm trying to create some unit tests for my project, after much digging around I found Effort, the idea is great, it mocks the database instead of the dealing with faking the DBContext which by the way is really hard to get it right when using a complex s...
c# effort entity-framework mocking unit-testing
asked by General Electric

Effort (EF Unit Testing) giving errors

I am trying to do unit testing on some classes that reply on an Entity Framework DB Context. For help, I managed to find a library called Effort, which seems to be a little old, and not very well documented, but it seems to work, and seems to be quite pop...
c# effort entity-framework unit-testing
asked by JonathanPeel

Effort (C#) - 'Sequence contains no matching element' when seeding data to any of my entities

I am trying to build some unit tests for a few web service calls in my project. I am using Entity Framework 6.1.3 in my project to retrieve the data at the service layer (with a code-first approach). I did some research on how to Mock a DatabaseContext ob...
c# effort entity-framework unit-testing
asked by Adrian Cruz

Page 1 of 2
  • 1
  • 2
  • »

Prime Library

Performance

  • Entity Framework Extensions
  • Entity Framework Classic
  • Bulk Operations
  • Dapper Plus

Expression Evaluator

  • C# Eval Expression
  • SQL Eval Function
More Projects...

Related

  • EF Extensions Online Benchmark
  • WIN an EF Extensions license
  • EF6 BatchSaveChanges for only $79
Get monthly updates by subscribing to our newsletter!
SUBSCRIBE!