Questions




Answers
1
How to find and extract only number from string in C#?

I have a string with numbers in it, for example here is the string "121 testing your City", now, I would like to extract only "121" from the string, how can I do that using C#?

...
Read More
C# extract int from string
Answers
4
Find common multiples between element of array in C#?

Hi, how can I get the common multiples of all element of array for example I have this array 2 4 3 . And I want to get the common multiples I do this code but not working. Can someone help me please. Thanks.

...
Read More
C# Count common multiples
Answers
2
How to Switch ORM in Repository Pattern (C# .NET MVC)?

I have been searching on it how to switch ORM using repository pattern, and i was not able to find "examples/sample codes" of it so i can study with that. 

I believe my search keywords were wrong (ex. How to switch from EF to ADO.NET using Repo pattern and etc), thats why I can not find an article that talks about it.

Lets say we implement repository pattern with Entity Framework.

Is it repo pattern tightly coupled in Entity Framework? or

Do I need to create another Data Access Layer that talks for ADO.NET/or DAPPER/ Nhibernate?(for example)

Thanks in Advance.

...
Read More
ASP.NET C# Repository Pattern
Answers
1
How to implement validation for input type file using jQuery or javascript?

Hello, I have a HTML form inside which there is <input type="file" /> field, and now before posting form to the server side, I need to validate/check if file field is empty or not, I want user to upload atleast one image file in this field, so how I can implement validation message for <input type ="file" /> field in the form using jQuery or javascript code?

Sample HTML Form

...
Read More
HTML Javascript file input validation
Answers
3
What does Service Layer do? Repository Pattern / Unit Of Work

Do i need Service Layer? From my point of view/understanding.

Presentation Layer = UI

Business Logic Layer = Domain/Entities, Interface and (should DTO resides here)?

Data Access Layer = Implementation of Repository Pattern, CRUD.

Service Layer = ???

If the BLL has Domain/Entities? what layer does business validation belongs to? 

From what i know and searched. Entites and DTO is plain.

 

 

...
Read More
C# ASP.NET Repository Pattern
Answers
1
how to convert UTC time to Local using C#?

Hello, I would like to know how can I convert UTC datetime into local (user's pc) datetime in asp.net MVC razor page using C#?

I thought .ToLocalTime() should work, but I am not getting correct result.

...
Read More
C# UTC to Local datetime
Answers
2
C# error "Type 'string' does not contain a definition for 'equals' and no extension method 'equals' of type 'string' could be found."

Hi please I'm converting 12-hour AM/PM format, to military 24-hour time format using C# Console app.

Note: Midnight is 12:00:00AM on a 12-hour clock, and 00:00:00 on a 24-hour clock. Noon is 12:00:00PM on a 12-hour clock, and 12:00:00 on a 24-hour clock.

My code is that :

...
Read More
c# missing assembly
Answers
1
How to force HTML table row to show data in single row using CSS?

How can I force HTML table row data (data inside <td>) to show it in single line instead of multiple lines using CSS, for example take a look at the below image

...

Read More
HTML CSS row data in one line
Answers
2
How to encrypt and decrypt a string in C#? Need easy method with example

How to encrypt and decrypt a string in C#? I would like to know simplest and efficient way for this using some example if possible, thanks

...
Read More
C# encrypt decrypt string
Answers
1
How to customize/configure cutom Login UI for Identity Server 4 based on their Quickstart Repo

How to change the default Login UI template of Identity Server 4 based on my preferences?.

What steps should I do to implement my desired design with Identity Server 4.

Any links that tells how to customize/cofigure the template will help.

I am having a hard time to implement my design onto it. I am thinking to create angular 2+ login page with restful services on identity server 4 but it was not recommended because of security purposes.

...
Read More
ASP.NET CORE Identity Server 4 MVC

Page 10 of 41