This blog contain tech artical, interview preparation for .net, Angular, SQL, UML Diagram
Monday, 23 June 2025
SQL Get record start with and end with particular character
I like to write on Angular MCQ.
I am Software developer. In free time I like to write blog. Nature lover
Sunday, 4 May 2025
02 SQL alias based Query. SQL MCQ
- When using aliase, it must be a single world.
- Alliase will not accept space
I like to write on Angular MCQ.
I am Software developer. In free time I like to write blog. Nature lover
Friday, 2 May 2025
01 SQL like operator based Question.
I like to write on Angular MCQ.
I am Software developer. In free time I like to write blog. Nature lover
Sunday, 27 April 2025
How to Signout from LinkedIn in mobile device browser.
I like to write on Angular MCQ.
I am Software developer. In free time I like to write blog. Nature lover
Friday, 25 April 2025
Quickest way to copy text from image in Window
I like to write on Angular MCQ.
I am Software developer. In free time I like to write blog. Nature lover
Tuesday, 15 April 2025
LinkedIn How to delete past Resume applied for job ?
In LinkedIn How to manage
Resume?
When you apply for Job, you upload a resume.
and each time if you have uploaded new resume then LinkedIn will save that
resume.
Benefit:
Next time while applying for new job, you can reuse those save resume.
Issue:
While applying for new Job, if you wish to use those existing saved resumes
then it is difficult to remember internal details of resume so which one as a
candidate need to use.
It’s a better to remove those older resumes.
In LinkedIn, how to manage Resume?
1: How to delete
saved resume (previous applied resume)
while applying
for new Job?
2: How to
add new resume on LinkedIn?
Solution:
Open LinkedIn
1.
Navigate
to the Jobs tab.
2.
Click
on Preferences.
3.
In
the pop-up modal, Resumes and application data.
4.
To Delete a previously applied resume -
By clicking on the … icon then click Delete.
5.
To Upload a new resume-
click on Upload resume
Youtube Link
I like to write on Angular MCQ.
I am Software developer. In free time I like to write blog. Nature lover
Monday, 17 February 2025
How to add Github profile to Linkedin ?
For step by step process, you can go through bellow video
I like to write on Angular MCQ.
I am Software developer. In free time I like to write blog. Nature lover
Thursday, 19 December 2024
c# In multilevel inheritance, from child call parent class method by base keyword then observe behaviour
I like to write on Angular MCQ.
I am Software developer. In free time I like to write blog. Nature lover
Thursday, 12 December 2024
How to Integrate Swagger in .NetCore Web API project
need to update launchsetting.json file.
For step by step detail, watch video.
I like to write on Angular MCQ.
I am Software developer. In free time I like to write blog. Nature lover
Sunday, 1 December 2024
How to add Stackoverflow profile to In LinkedIn profile ?
I like to write on Angular MCQ.
I am Software developer. In free time I like to write blog. Nature lover
Sunday, 26 May 2024
C# Custom Data Data Annotation - Validators with Example
(1) What is Custom Data Annotations in C# model class?
When Custom Data Annotation useful?
Ans: You have learn and regular and basic Data Annotation for validaion.
We can apply validation at Model (POCO) class by using appropriate attribute.
Like Required, StringLength, MaxLength, EmailAddress and many more.
Now add following code for UI side

@model WebAppCustomDataAnnotation.Models.Student
<h2>Create</h2>
@using (Html.BeginForm())
{
<div class="form-horizontal">
@Html.ValidationSummary(true, "", new { @class = "text-danger" })
<div class="form-group">
@Html.LabelFor(model => model.Name, htmlAttributes: new { @class = "control-label col-md-2" })
@Html.EditorFor(model => model.Name, new { htmlAttributes = new { @class = "form-control" } })
@Html.ValidationMessageFor(model => model.Name, "", new { @class = "text-danger" })
</div>
<div class="form-group">
@Html.LabelFor(model => model.Email, htmlAttributes: new { @class = "control-label col-md-2" })
@Html.EditorFor(model => model.Email, new { htmlAttributes = new { @class = "form-control" } })
@Html.ValidationMessageFor(model => model.Email, "", new { @class = "text-danger" })
</div>
<div class="form-group">
<input type="submit" value="Create" class="btn btn-default" />
</div>
</div>
}
@section Scripts {
@Scripts.Render("~/bundles/jqueryval")
}
In this post we focus on custom Data Annotation.
When default attribute not sufficient to achieve our validation.
When validation is not achievable by Microsoft provided attribute
For example - We have a Student table in Data base.
Before saving record, We need to check EMail value must be unique.
But this is not achievable my available basic attribute.
But to tackle this limitation, we have Custom Data Annotation.
Assume system already contain email - "name@company.com"
If user try to insert same value again then validation must be there.
and error message will be prompt.
Create new class :
UniqueEmailAttribute and inherit ValidationAttribute.
public class UniqueEmailAttribute : ValidationAttribute
{
protected override ValidationResult IsValid(object _value, ValidationContext validationContext)
{
if (_value != null && _value.ToString() == "name@company.com")
{
return new ValidationResult(ErrorMessage = "Email address already exist");
}
return ValidationResult.Success;
}
}
Here we have create Custom Data Annotation.
It contain IsValid() method.
We have override this method and added logic to check existing value.
Provided Email value come at first parameter : object _value
If input email value is "name@company.com" then
it will return Error message.
Otherwise will return Success.(Validation passed)
You can provide error message as per your requirement.
This Method return ValidationResult.
Final Step :
Now add this created custom data annotation as attribute
at Email property in Student class.

[Required(ErrorMessage = "Email address is required.")]
[UniqueEmail]
public string Email { get; set; }
Here error message is hard coded. but in real scenario it never happen.
So error message must be dynamicaly need to set.
In Student model - along with custom attribute "UniqueEmail",
need to add ErrorMessage as shown in bellow.

As Error message set in Attribute, will show in bellow display
when in Email field value added and "Create" button clicked as shown bellow.
I like to write on Angular MCQ.
I am Software developer. In free time I like to write blog. Nature lover
Saturday, 26 August 2023
SQL Part-2 : How to swap two column values in same table ?
Note : All questions are related to SQL Server.
(1) In SQL : How to swap two column values ?
I like to write on Angular MCQ.
I am Software developer. In free time I like to write blog. Nature lover
Tuesday, 1 August 2023
SQL interview question Part-1
Note : All sql related question related to SQL Server.
(1) How to get current Age based on BirthDate ?
SELECT top 5 BirthDate, DATEDIFF ( YEAR ,BirthDate , getdate() ) as age,LoginID
FROM [HumanResources].[Employee]
I like to write on Angular MCQ.
I am Software developer. In free time I like to write blog. Nature lover
Monday, 31 May 2021
C# interview question Part-1
0) What will be output of following c# code ? (base class understanding)
(1) C# default access modifier
namespace : public enum : publicinterface : publicclass : private
struct : private
delegate : private
constructor : private (note if no constructor is explicitly defined,
a public default constructor will be automatically defined)
method : private
field : privateenum member : publiccinterface member: publicFor example
namespace AccessDemo
{
class OuterClass
{
void MethodA() {}
class InnerClass {}
}
}
is equivalent to
namespace AccessDemo
{
internal class OuterClass
{
private void MethodA() {}
private class InnerClass {}
}
}
(2)In Console Application, how to get input from the user ?
Ans : Using Console.ReadLine()Console.Write("Enter input : ");
string userinput = Console.ReadLine();
Console.WriteLine("You entered '{0}'", userinput
);
output :
Enter input : test input
You entered 'test input'
'
I like to write on Angular MCQ.
I am Software developer. In free time I like to write blog. Nature lover

