cost 74 ms
如何使用SharpRepository创建数据的本地文件系统存储库 - How can I use the SharpRepository to create a local filesystem repository of my data

我正在开发.net框架控制台代码,用位填充。 在生成实体之后,我想实现一个存储库来保存我的实体,这样就不必再次生成实体。 首先,我希望存储库将数据文件写入本地文件系统,然后在以后需要时将更健壮的(RMDBS)后端放入。 我当然也希望能够对存储库进行单元测试/模拟。 我在github上 ...

SharpRepository .NET Core异步操作无实现 - SharpRepository .NET Core no implementation for asynchronous operations

我刚刚开始使用SharpRepository替换.NET Core项目中当前的GenericRepository。 这是一个API项目,需要处理大量并发请求。 但是,我找不到异步操作的任何实现。 有什么具体原因吗? 如果我想一直保持异步状态,是否应该将同步SharpRepository操 ...

EF与SharpRepository中流利查询的性能问题 - Performance issue with fluent query in EF vs SharpRepository

我在使用SharpRepository时遇到了一些性能问题,在玩过SQL Query Profiler之后,我找到了原因。 使用EF,我可以执行以下操作: 直到使用完书籍(最后一行),EF才会真正做任何事情,然后它将编译一个查询,该查询将仅从数据库中选择与年份和作者匹配的一小部分数 ...

SharpRepository.EntityFramework 即使我告诉它不要缓存数据,我该如何防止它? - SharpRepository.EntityFramework caches data even if I tell it not to, how can I prevent it?

我正在使用 SharpRepository.EntityFramework,默认配置。 在 app.config 中定义了存储库……嗯,这是一个很大的应用程序,所以我将向您展示相关的代码片段: 所以这部分代码每 15 秒调用一次。 它从需要处理的数据库中获取记录列表。 这是奇怪的事情。 假设我 ...

我需要与Ninject绑定到数据库并将它们同时注入到相同的存储库中 - I need to bind with Ninject to database and inject them to same repository in same time

在我的代码类NinjectWebCommon某些部分中,我需要绑定dada上下文。 这只是一部分代码,而不是完整的类。 类别存储库类,我需要同时拥有两个数据库 在我的项目中,我使用SharpRepository(ConfigurationBasedRepository),而我使 ...

SharpRepository单元测试CacheRepository无法添加多个项目 - SharpRepository Unit Testing CacheRepository Unable to Add Multiple Items

我们在EntityFramework 6的顶部使用SharpRepository,到目前为止效果很好。 我们还正在实施完整的单元测试,在研究批准的方法中,通过SharpRepository与SharpRepository进行单元测试是可以的,这使我们可以用一致的测试数据填充存储库,然后针对这些 ...

SharpRepository是否在测试中不处置存储库? - SharpRepository is not disposing of repositories in testing?

我正在尝试为利用实体框架和SharpRepository的应用程序编写集成测试。 目前,我正在编写一些测试,我注意到在TestCleanup期间调用Dispose()时,不会删除添加到测试中存储库中的数据。 我的代码如下: 这些测试的主要目的不是测试EntityFramework的S ...

将开放的泛型类型绑定到Simple Injector中的方法 - Binding an open generic type to a method in Simple Injector

我正在尝试配置SharpRepository项目,使其也将SimpleInjector IOC框架用作该框架中的IOC选项,但在移植某些代码时会遇到问题。 无法弄清楚如何使用SimpleInjector传入<>通用接口。 第二个问题是如何使用简单的注入器将通用参数传递到上下文 ...

如何将Entity Framework DbContext注入SharpRepository的ConfigurationBasedRepository - How-to inject the Entity Framework DbContext into the ConfigurationBasedRepository of SharpRepository

我真的想将SharpRepository与Ninject一起使用,但我不明白如何配置Ninject以在存储库之间共享Entity Framework DbContext。 我正在使用Entity Framework版本5和Ninject版本3。 目前我在源代码中使用Ef5Reposi ...


 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM