All Questions
Tagged with class-library asp.net-mvc
46
questions
1
vote
3
answers
291
views
Custom dependency injection in a class library file
I am working on a project(asp.net mvc-5 with jQuery) in which whole validation is happening in front-end and we are executing APIs using $.ajax call, now as there are no validations on API level or ...
0
votes
1
answer
90
views
Reference class libraries
A class library named KMS is referenced to another class library named KMS_.Data in my project. Following is code from KMS.csproj XML file:
<ItemGroup>
<ProjectReference Include="..\...
0
votes
1
answer
41
views
Can't reference betwen Class Libary and WCF Class Libary
I'm currently trying to learn ASP.NET MVC.. But I'm strugling about to use my Interface(Class Lib) in WCF Lib... I tried to use diffrent Nuget's but none of them helped me.. Can anyone help me ?
1
vote
1
answer
438
views
How to move my database calls from the Web API to Class Library?
I have Web Api that have this call:
[HttpGet("getLocation")]
public async Task<IActionResult> GetLocation([FromQuery] int id)
{
var ConnectionString = new ConnectionStringsOptions()...
0
votes
1
answer
450
views
Sharing/Extending a DbContext from an MVC .NET Core application to a (Razor) class library
I have a web application with its own dbcontext (context1), and I've a Razor class library with another dbcontext (context2). Ideally I should have a single db context...
The problem i have is when ...
1
vote
1
answer
462
views
How to create solution with multiple version support in mvc
I am creating one project in Asp.net MVC 4.7.1 latest version and want to reuse that solution as class library dll in other projects also. But other projects where we are using this dll not support ...
1
vote
1
answer
311
views
How to use Controllers from one class library to another class library? ASP.NET
I want to make a project which will contain multiple class libraries (like 2-3 different ones). So I want to know is it possible for me to use controllers from one class library to another class ...
0
votes
1
answer
1k
views
How to open exe using WebAPI and class library
I'm creating WebAPI in c# .NET framework 4.6.1. I have taken an empty template, added a controller:
public class InfoController : ApiController
{
public bool LaunchNotePad()
{
...
1
vote
1
answer
1k
views
How to use Entity Framework 6 Code First in Class Library Project with MVC 5
I have a Class Library Project(.Net Framework) and Asp.Net MVC 5 project in same solution. Then, I add a reference of Class Library to MVC 5 project.
How do I use Entity Framework in class library ...
1
vote
1
answer
2k
views
Get client's IP Address in common c# Class Library for WebAPI and WebApplication
My business layer is common for WebApi and WebApplication. Need to track the client's IP address for each action. Searched on web and tried this but on development but I think this is for Server . I ...
-1
votes
1
answer
46
views
asp.net class library that talks to ef and customizable
I'm trying to make a class library that contains only the core logic of may app.
I've seen many tutorials that do this but they include the EF core inside that library. What I want to do is put only ...
1
vote
0
answers
756
views
Not Enough Storage Is Available To Process this Command in mvc application
I am using Memory Mapped Files to read data from binary file like below but getting error :
Error : Not Enough Storage Is Available To Process This Command.
public void Execute()
{
...
0
votes
1
answer
323
views
lambda expression and the model keyword cannot be used in strongly typed views inside a class library [duplicate]
i created a strongly typed view inside a class library project everything works fine i can add the @model myPoject.etc.etc intellisense is working fine i can use Html helpers etc.
But when i create ...
2
votes
1
answer
1k
views
Using Conditional Compilation symbol in Class Library
I have used a class library which is being called by Web Application and Windows service. All of them are contained in a single solution.
I want to execute some code in the class library based on the ...
1
vote
2
answers
182
views
Cannot use built in Identity classes with database-first development
I'm stuck in a weird issue. I have to start an ASP.NET MVC project with a database-first approach. I want to use built-in identity for authentication and authorization.
I have successfully added ...