Quantcast
Channel: ASP.NET Core
Browsing all 9386 articles
Browse latest View live

Configure SerializerSettings.ContractResolver

Hello , I have write the following code in the "ConfigureServices" method :             services.AddMvc().AddJsonOptions(opt =>{                      opt.SerializerSettings.ReferenceLoopHandling =...

View Article


controllers

Hi, as i understand every time that an action is called a new instance of the corresponding controller is creating, but in asp.net core we use DI so the properties like EF db contextes won't recreate...

View Article


Entity framework 6 dight id(primary key)

Good day!How I can get 6 dight id with code first? (100000 and above)

View Article

NotSupportedException: The given path's format is not supported

For some reason, my uploading file/image code escapes me - I can't remember for the life of me on how to get it to work.Code:if (model.ImageUpload != null) { var filePath =...

View Article

ModelBuilder OR Data Annotation

HiAs I read in EF2.0 I am able to set a field as requiredusing data annotation by  writting [Required] before the property name ORmodelBuilder.Entity<Order>().Property(t =>...

View Article


how to convert this to a static class

Hi,I use this class in my test project. I want to use it a static class. how to convert it. public static void Language()1- IUnitOfWork  is a interface. sample is down that it is. 2- HttpContext is...

View Article

How to add customised style sheet

HiI am new in asp.net mvc core 2 and I am doing a new project.   I have copied the following  css file and js file in the folder  bootstrap\dist \css and  bootstrap\dist \js. In which places I have to...

View Article

Getting the current DbContext from an object

My aspnet core app is using EFCore 2.1 for the ORM, but I'm struggling to find out how to get the context from which an object has been created.So I want to have some extension methods which would...

View Article


System.Web.OData.Query goes undefined in VS2015

Folks I just triedInstall-Package Microsoft.AspNet.Odata and it worked System.Web.OData.Qurey got resolved. So please ignore and close this posting. Hi,I have Windows 10, VS2015. System.Web.OData.Qurey...

View Article


Localization

I added a route to every request of my site like:routes.MapRoute( name: null, template: "{culture}", defaults: new { controller = "Home", action = "Index", culture = "en" }); routes.MapRoute(name:...

View Article

Request for feedback: FluentRestBuilder

Hello everyoneI have created a small library to help with RESTful API development. It is inspired by Rx.NET and provides a fluent API to implement controller operations.NuGet:...

View Article

top-level member mapping?

I have this model, public class PatientRegistry { [DatabaseGenerated(DatabaseGeneratedOption.Identity)] [Display(Name = "Record Id")] public long RecordId { get; set; } [Key,...

View Article

IActionFilter with culture

Hi,I am studying filters issues. I want to set culture in filters. I got it. but I have to refresh page on filters why ?If I dont use response.redirect, I cant see localization settings. if page...

View Article


How can RenderSection works in Partial Views of .net core?

I need to add some css and js in <head> of serval pages,but not all pages.So I using a section in _Layout.cshtml of <head>:@RenderSection("JSANDCSS", false)What's more ,the css and js in...

View Article

Data Model with ApplicationUser Field as Foreign Key and Populating This With...

HelloI have created my first ASP.NET Core web application using the individual user accounts option and added a new data model (for blog entries) where I want to add a CreatedBy field to store the ID...

View Article


Image may be NSFW.
Clik here to view.

Speed up for large data

Hi folks,I am using asp.net core with web api and Novell LDAP library. Here is sample code as below:LdapConnection conn = new LdapConnection(); Console.WriteLine("Connecting to:" + ldapHost);...

View Article

Image may be NSFW.
Clik here to view.

BOOTSTRAP- Reduce the height of HTML Action link

Hi guys,i have a list of values in a HTML action link, and would like to reduce the spacing between each link.How do I do so ? see attachmentThank you

View Article


Some way to modify background process / thread from UI (ASP.net Core 2)

Hello,I am developing a website in ASP .NET Core MVC 2.  I am trying to stream real-time video to my clients, and I need to do it frame by frame, as the video is modified before being sent to the...

View Article

IOptions at Razor page missing reference

Hi,I created a clean Core 2.0 with Authentication, but when I inject the IOptions at Razor page (Account/login), the error occurs. Nuget already reference "Microsoft.Extensions.Options (2.0.1)" when I...

View Article

Encrypt/Decrypt chat messages (strings) in ASP.NET Core 2

Hello!I'm working on a fairly simple chat application where I would like to add some more security. As of now the app runs on Azure with a SQL Server database with transparent encryption, I would like...

View Article
Browsing all 9386 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>