大餐说它缺少界面的组件或参考
我得到这个错误: 错误CS0246找不到类型或命名空间名称'ireimbursementTravelRcptService'(您是否缺少使用指令或汇编参考?)
我这样声明了我的类:
namespace Expense_Reimbursement.Services {
public interface IReimbursementTravelRcptService
{
}
public class ReimbursementTravelRcptService : IReimbursementTravelRcptService
{
} }
我在parterup.cs in Configureservices中的proceptup.cs in Configureservices: services.AddScoped< ireimbursementTravelRcptService,ReimbursementTravelRcptService>();
但是当我尝试注入它时,它给出了上述错误: @Inject IreimbursementTravelRcptService _irtsrsrservice;
我觉得我忘记了一些简单的东西,但我不知道我缺少什么。有什么想法吗?
谢谢
I get this error:
Error CS0246 The type or namespace name 'IReimbursementTravelRcptService' could not be found (are you missing a using directive or an assembly reference?)
I declare my class like this:
namespace Expense_Reimbursement.Services {
public interface IReimbursementTravelRcptService
{
}
public class ReimbursementTravelRcptService : IReimbursementTravelRcptService
{
} }
I have this in the Startup.cs in ConfigureServices:
services.AddScoped<IReimbursementTravelRcptService, ReimbursementTravelRcptService>();
But when I try to inject it it gives the error above:
@inject IReimbursementTravelRcptService _irtsrService;
I feel like I forgot something simple but I do not know what I am missing. Any ideas?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论