Interview Q&A

Master technical and career interviews with structured answers—short definition, real examples, pitfalls, and how to answer in 60–90 seconds.

4616 total questions 4516 technical 100 career & HR 4346 from PDF library

Showing 101–125 of 226

Popular tracks

Mid PDF
Handling large uploads/downloads (streaming, chunking)?

Answer: For large uploads, use IFormFile, Stream, or read from Request.Body for streaming. For downloads, return FileStreamResult. Enable buffering or streaming to avoid memory overload. What interviewers expect A clear…

ASP.NET Core Read answer
Mid PDF
Error handling / global exception handling in APIs Use UseExceptionHandler middleware or custom ExceptionMiddleware. You can also create a global error handler:

Answer: pp.UseExceptionHandler(config => { config.Run(async context => { // Log and return problem details }); }); Or use ProblemDetails for structured error responses. What interviewers expect A clear defi…

ASP.NET Core Read answer
Mid PDF
Error handling / global exception handling in APIs?

Use UseExceptionHandler middleware or custom ExceptionMiddleware. You can also create a global error handler: app.UseExceptionHandler(config => { config.Run(async context => { // Log and return problem details });…

ASP.NET Core Read answer
Mid PDF
Returning appropriate HTTP status codes?

Use proper status codes: 200 OK (success) 201 Created (on POST) 204 No Content (on DELETE) 400 Bad Request 401 Unauthorized / 403 Forbidden 404 Not Found 500 Internal Server Error return Ok(result); return NotFound(); re…

ASP.NET Core Read answer
Mid PDF
Using ActionResult<T> vs IActionResult?

ActionResult&lt;T&gt;: Combines a return value and response code. public ActionResult&lt;Product&gt; Get(int id) { ... } IActionResult: More flexible, returns different result types explicitly. Prefer ActionResult&lt;T&g…

ASP.NET Core Read answer
Mid PDF
Asynchronous APIs (async/await)?

SP.NET Core supports full async/await pattern for IO-bound tasks. [HttpGet] public async Task&lt;ActionResult&lt;Product&gt;&gt; GetAsync(int id) { var product = await _repo.GetAsync(id); return product == null ? NotFoun…

ASP.NET Core Read answer
Mid PDF
Asynchronous APIs (async/await) ASP.NET Core supports full async/await pattern for IO-bound tasks. [HttpGet] public async Task<ActionResult<Product>> GetAsync(int id) { var product = await _repo.GetAsync(id); return product == null ?

NotFound() : Ok(product); ✅ Improves scalability and performance. What interviewers expect A clear definition tied to ASP.NET Core in ASP.NET Core projects Trade-offs (performance, maintainability, security, cost) When y…

ASP.NET Core Read answer
Mid PDF
CORS for Web APIs?

Enable CORS (Cross-Origin Resource Sharing) to allow client apps from different domains: services.AddCors(options =&gt; { options.AddPolicy("AllowFrontend", builder =&gt; builder.WithOrigins(" .AllowAnyHeader() .AllowAny…

ASP.NET Core Read answer
Mid PDF
Rate Limiting & Throttling:?

Answer: It can enforce rate limiting to prevent abuse and throttling to limit the number of requests a client can make. What interviewers expect A clear definition tied to ASP.NET Core in ASP.NET Core projects Trade-offs…

ASP.NET Core Read answer
Mid PDF
API documentation: Swagger / OpenAPI Use Swashbuckle.AspNetCore or NSwag for generating Swagger docs. services.AddSwaggerGen();

Answer: pp.UseSwagger(); pp.UseSwaggerUI(); Supports: Auto-generated OpenAPI docs Try it out interface Versioning support What interviewers expect A clear definition tied to ASP.NET Core in ASP.NET Core projects Trade-of…

ASP.NET Core Read answer
Mid PDF
API documentation: Swagger / OpenAPI?

Answer: Use Swashbuckle.AspNetCore or NSwag for generating Swagger docs. services.AddSwaggerGen(); app.UseSwagger(); app.UseSwaggerUI(); Supports: Auto-generated OpenAPI docs Try it out interface Versioning support What…

ASP.NET Core Read answer
Mid PDF
Testing Web API endpoints (unit / integration)?

Unit testing: Mock services/repositories using Moq or FakeItEasy. Integration testing: Use WebApplicationFactory&lt;T&gt; + TestServer + HttpClient. var client = _factory.CreateClient(); var response = await client.GetAs…

ASP.NET Core Read answer
Mid PDF
Authorization/authentication in APIs (JWT, OAuth)?

Use JWT Bearer Tokens for stateless auth: services.AddAuthentication(JwtBearerDefaults.AuthenticationSch eme) .AddJwtBearer(options =&gt; { ... }); Secure endpoints with: [Authorize(Roles = "Admin")] OAuth supported via…

ASP.NET Core Read answer
Mid PDF
Securing APIs: Anti‐Forgery, CORS, HTTPS, etc.?

Answer: HTTPS: Enforced via UseHttpsRedirection() CORS: Limit origins using policies Anti-forgery: Usually not needed for APIs unless using cookies (use ValidateAntiForgeryToken) Use authentication + authorization checks…

ASP.NET Core Read answer
Mid PDF
DTOs and mapping (e.g. AutoMapper)?

Answer: DTOs decouple internal models from API contracts. Use AutoMapper for mapping: CreateMap&amp;lt;Product, ProductDto&amp;gt;(); var dto = _mapper.Map&amp;lt;ProductDto&amp;gt;(product); What interviewers expect A c…

ASP.NET Core Read answer
Mid PDF
Versioning pitfalls and backward compatibility?

Answer: Avoid breaking changes to existing endpoints. Use new versions for changes in contracts. Maintain old versions as long as needed. Ensure documentation and clients are updated accordingly. What interviewers expect…

ASP.NET Core Read answer
Mid PDF
Handling concurrency / optimistic concurrency?

Use RowVersion / ETag to detect concurrent edits. Example with EF Core: modelBuilder.Entity&lt;Product&gt;() .Property(p =&gt; p.RowVersion).IsRowVersion(); Return 409 Conflict if concurrency exception is caught. Model B…

ASP.NET Core Read answer
Mid PDF
How model binding works: what sources it considers Model binding in ASP.NET Core maps incoming HTTP data to C# parameters or model properties. 🔍 Sources considered: ● Route data ● Query string ● Form data ● Headers ● JSON body (application/json) ● Uploaded files ● Services (via [FromServices])

Answer: SP.NET Core automatically binds data based on parameter types and attributes ([FromBody], [FromQuery], etc.). What interviewers expect A clear definition tied to ASP.NET Core in ASP.NET Core projects Trade-offs (…

ASP.NET Core Read answer
Mid PDF
How model binding works: what sources it considers?

Model binding in ASP.NET Core maps incoming HTTP data to C# parameters or model properties. 🔍 Sources considered: Route data Query string Form data Headers JSON body (application/json) Uploaded files Services (via [From…

ASP.NET Core Read answer
Mid PDF
Binding complex types vs simple types?

Simple types (int, string, bool, DateTime, etc.): Bound from route, query string, or form fields. Complex types (custom classes): Bound from multiple sources like query/form fields or JSON body. public IActionResult Crea…

ASP.NET Core Read answer
Mid PDF
Custom model binders?

Use a custom model binder when default binding doesn’t work (e.g., custom formats, headers). public class CustomBinder : IModelBinder { public Task BindModelAsync(ModelBindingContext context) { // Custom logic here } } R…

ASP.NET Core Read answer
Mid PDF
Handling multiple binder source attributes ([FromBody],?

[FromQuery], etc.) You cannot bind multiple [FromBody] parameters in a single action. Common sources: [FromBody] — for JSON/XML payloads [FromQuery] — query string [FromRoute] — route values [FromForm] — form fields and…

ASP.NET Core Read answer
Mid PDF
Model validation: data annotations?

Answer: Decorate models with attributes: public class User { [Required] [StringLength(50)] [EmailAddress] public string Email { get; set; } } Used in both MVC and API for validation. What interviewers expect A clear defi…

ASP.NET Core Read answer
Mid PDF
Server-side validation vs client-side validation (unobtrusive)?

Answer: Server-side: Always performed on the server; use ModelState.IsValid. Client-side: HTML5 + jQuery Unobtrusive Validation (for MVC/Razor Pages). Client-side validation improves UX, but server-side is essential for…

ASP.NET Core Read answer
Mid PDF
Custom validation attributes?

Create custom rules by inheriting ValidationAttribute: public class MustBeEvenAttribute : ValidationAttribute { public override bool IsValid(object value) { return (int)value % 2 == 0; } } Use like: [MustBeEven] public i…

ASP.NET Core Read answer

ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core

Answer: For large uploads, use IFormFile, Stream, or read from Request.Body for streaming. For downloads, return FileStreamResult. Enable buffering or streaming to avoid memory overload.

What interviewers expect

  • A clear definition tied to ASP.NET Core in ASP.NET Core projects
  • Trade-offs (performance, maintainability, security, cost)
  • When you would and would not use it in production

Real-world example

In a production ASP.NET Core application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.

How to explain in the interview

  1. Define the concept in one or two sentences.
  2. Context — where it fits in ASP.NET Core architecture.
  3. Example — a specific project, bug, or performance win.
  4. Trade-off — what you gain vs what you sacrifice.

Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.

Permalink & share

ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core

Answer: pp.UseExceptionHandler(config =&gt; { config.Run(async context =&gt; { // Log and return problem details }); }); Or use ProblemDetails for structured error responses.

What interviewers expect

  • A clear definition tied to ASP.NET Core in ASP.NET Core projects
  • Trade-offs (performance, maintainability, security, cost)
  • When you would and would not use it in production

Real-world example

In a production ASP.NET Core application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.

How to explain in the interview

  1. Define the concept in one or two sentences.
  2. Context — where it fits in ASP.NET Core architecture.
  3. Example — a specific project, bug, or performance win.
  4. Trade-off — what you gain vs what you sacrifice.

Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.

Permalink & share

ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core

Use UseExceptionHandler middleware or custom ExceptionMiddleware.

You can also create a global error handler:

app.UseExceptionHandler(config => {

config.Run(async context => {

// Log and return problem details

});

});

Or use ProblemDetails for structured error responses.

Permalink & share

ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core

Use proper status codes:

  • 200 OK (success)
  • 201 Created (on POST)
  • 204 No Content (on DELETE)
  • 400 Bad Request
  • 401 Unauthorized / 403 Forbidden
  • 404 Not Found
  • 500 Internal Server Error
return Ok(result);
return NotFound();
return BadRequest(ModelState);
Permalink & share

ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core

  • ActionResult<T>: Combines a return value and response code.
public ActionResult<Product> Get(int id) { ... }
  • IActionResult: More flexible, returns different result types explicitly.

Prefer ActionResult<T> for simpler, strongly-typed APIs.

Permalink & share

ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core

SP.NET Core supports full async/await pattern for IO-bound tasks.

[HttpGet]

public async Task<ActionResult<Product>> GetAsync(int id) {
var product = await _repo.GetAsync(id);
return product == null ? NotFound() : Ok(product);
}

✅ Improves scalability and performance.

Permalink & share

ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core

NotFound() : Ok(product); ✅ Improves scalability and performance.

What interviewers expect

  • A clear definition tied to ASP.NET Core in ASP.NET Core projects
  • Trade-offs (performance, maintainability, security, cost)
  • When you would and would not use it in production

Real-world example

In a production ASP.NET Core application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.

How to explain in the interview

  1. Define the concept in one or two sentences.
  2. Context — where it fits in ASP.NET Core architecture.
  3. Example — a specific project, bug, or performance win.
  4. Trade-off — what you gain vs what you sacrifice.

Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.

Permalink & share

ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core

Enable CORS (Cross-Origin Resource Sharing) to allow client apps from

different domains:

services.AddCors(options => {

options.AddPolicy("AllowFrontend", builder =>

builder.WithOrigins("

.AllowAnyHeader()

.AllowAnyMethod());

});

app.UseCors("AllowFrontend");

Permalink & share

ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core

Answer: It can enforce rate limiting to prevent abuse and throttling to limit the number of requests a client can make.

What interviewers expect

  • A clear definition tied to ASP.NET Core in ASP.NET Core projects
  • Trade-offs (performance, maintainability, security, cost)
  • When you would and would not use it in production

Real-world example

In a production ASP.NET Core application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.

How to explain in the interview

  1. Define the concept in one or two sentences.
  2. Context — where it fits in ASP.NET Core architecture.
  3. Example — a specific project, bug, or performance win.
  4. Trade-off — what you gain vs what you sacrifice.

Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.

Permalink & share

ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core

Answer: pp.UseSwagger(); pp.UseSwaggerUI(); Supports: Auto-generated OpenAPI docs Try it out interface Versioning support

What interviewers expect

  • A clear definition tied to ASP.NET Core in ASP.NET Core projects
  • Trade-offs (performance, maintainability, security, cost)
  • When you would and would not use it in production

Real-world example

In a production ASP.NET Core application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.

How to explain in the interview

  1. Define the concept in one or two sentences.
  2. Context — where it fits in ASP.NET Core architecture.
  3. Example — a specific project, bug, or performance win.
  4. Trade-off — what you gain vs what you sacrifice.

Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.

Permalink & share

ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core

Answer: Use Swashbuckle.AspNetCore or NSwag for generating Swagger docs. services.AddSwaggerGen(); app.UseSwagger(); app.UseSwaggerUI(); Supports: Auto-generated OpenAPI docs Try it out interface Versioning support

What interviewers expect

  • A clear definition tied to ASP.NET Core in ASP.NET Core projects
  • Trade-offs (performance, maintainability, security, cost)
  • When you would and would not use it in production

Real-world example

In a production ASP.NET Core application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.

How to explain in the interview

  1. Define the concept in one or two sentences.
  2. Context — where it fits in ASP.NET Core architecture.
  3. Example — a specific project, bug, or performance win.
  4. Trade-off — what you gain vs what you sacrifice.

Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.

Permalink & share

ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core

  • Unit testing: Mock services/repositories using Moq or FakeItEasy.
  • Integration testing: Use WebApplicationFactory<T> + TestServer

+ HttpClient.

var client = _factory.CreateClient();
var response = await client.GetAsync("/api/products");
Permalink & share

ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core

  • Use JWT Bearer Tokens for stateless auth:

services.AddAuthentication(JwtBearerDefaults.AuthenticationSch

eme)

.AddJwtBearer(options => { ... });
  • Secure endpoints with:

[Authorize(Roles = "Admin")]

  • OAuth supported via IdentityServer, Azure AD, or external

providers.

Permalink & share

ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core

Answer: HTTPS: Enforced via UseHttpsRedirection() CORS: Limit origins using policies Anti-forgery: Usually not needed for APIs unless using cookies (use ValidateAntiForgeryToken) Use authentication + authorization checks for all endpoints

What interviewers expect

  • A clear definition tied to ASP.NET Core in ASP.NET Core projects
  • Trade-offs (performance, maintainability, security, cost)
  • When you would and would not use it in production

Real-world example

In a production ASP.NET Core application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.

How to explain in the interview

  1. Define the concept in one or two sentences.
  2. Context — where it fits in ASP.NET Core architecture.
  3. Example — a specific project, bug, or performance win.
  4. Trade-off — what you gain vs what you sacrifice.

Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.

Permalink & share

ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core

Answer: DTOs decouple internal models from API contracts. Use AutoMapper for mapping: CreateMap&lt;Product, ProductDto&gt;(); var dto = _mapper.Map&lt;ProductDto&gt;(product);

What interviewers expect

  • A clear definition tied to ASP.NET Core in ASP.NET Core projects
  • Trade-offs (performance, maintainability, security, cost)
  • When you would and would not use it in production

Real-world example

In a production ASP.NET Core application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.

How to explain in the interview

  1. Define the concept in one or two sentences.
  2. Context — where it fits in ASP.NET Core architecture.
  3. Example — a specific project, bug, or performance win.
  4. Trade-off — what you gain vs what you sacrifice.

Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.

Permalink & share

ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core

Answer: Avoid breaking changes to existing endpoints. Use new versions for changes in contracts. Maintain old versions as long as needed. Ensure documentation and clients are updated accordingly.

What interviewers expect

  • A clear definition tied to ASP.NET Core in ASP.NET Core projects
  • Trade-offs (performance, maintainability, security, cost)
  • When you would and would not use it in production

Real-world example

In a production ASP.NET Core application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.

How to explain in the interview

  1. Define the concept in one or two sentences.
  2. Context — where it fits in ASP.NET Core architecture.
  3. Example — a specific project, bug, or performance win.
  4. Trade-off — what you gain vs what you sacrifice.

Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.

Permalink & share

ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core

  • Use RowVersion / ETag to detect concurrent edits.

Example with EF Core:

modelBuilder.Entity<Product>()

.Property(p => p.RowVersion).IsRowVersion();
Return 409 Conflict if concurrency exception is caught.

Model Binding & Validation

Permalink & share

ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core

Answer: SP.NET Core automatically binds data based on parameter types and attributes ([FromBody], [FromQuery], etc.).

What interviewers expect

  • A clear definition tied to ASP.NET Core in ASP.NET Core projects
  • Trade-offs (performance, maintainability, security, cost)
  • When you would and would not use it in production

Real-world example

In a production ASP.NET Core application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.

How to explain in the interview

  1. Define the concept in one or two sentences.
  2. Context — where it fits in ASP.NET Core architecture.
  3. Example — a specific project, bug, or performance win.
  4. Trade-off — what you gain vs what you sacrifice.

Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.

Permalink & share

ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core

Model binding in ASP.NET Core maps incoming HTTP data to C# parameters or model

properties.

🔍 Sources considered:

  • Route data
  • Query string
  • Form data
  • Headers
  • JSON body (application/json)
  • Uploaded files
  • Services (via [FromServices])

ASP.NET Core automatically binds data based on parameter types and attributes

([FromBody], [FromQuery], etc.).

Permalink & share

ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core

  • Simple types (int, string, bool, DateTime, etc.): Bound from route, query string, or
form fields.
  • Complex types (custom classes): Bound from multiple sources like query/form fields

or JSON body.

public IActionResult Create([FromBody] Product product)
Permalink & share

ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core

Use a custom model binder when default binding doesn’t work (e.g., custom formats,

headers).

public class CustomBinder : IModelBinder {
public Task BindModelAsync(ModelBindingContext context) {

// Custom logic here

}
}

Register with [ModelBinder] or globally in Startup.

Permalink & share

ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core

[FromQuery], etc.)

You cannot bind multiple [FromBody] parameters in a single action.

Common sources:

  • [FromBody] — for JSON/XML payloads
  • [FromQuery] — query string
  • [FromRoute] — route values
  • [FromForm] — form fields and file uploads
  • [FromHeader] — HTTP headers
Permalink & share

ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core

Answer: Decorate models with attributes: public class User { [Required] [StringLength(50)] [EmailAddress] public string Email { get; set; } } Used in both MVC and API for validation.

What interviewers expect

  • A clear definition tied to ASP.NET Core in ASP.NET Core projects
  • Trade-offs (performance, maintainability, security, cost)
  • When you would and would not use it in production

Real-world example

In a production ASP.NET Core application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.

How to explain in the interview

  1. Define the concept in one or two sentences.
  2. Context — where it fits in ASP.NET Core architecture.
  3. Example — a specific project, bug, or performance win.
  4. Trade-off — what you gain vs what you sacrifice.

Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.

Permalink & share

ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core

Answer: Server-side: Always performed on the server; use ModelState.IsValid. Client-side: HTML5 + jQuery Unobtrusive Validation (for MVC/Razor Pages). Client-side validation improves UX, but server-side is essential for security.

What interviewers expect

  • A clear definition tied to ASP.NET Core in ASP.NET Core projects
  • Trade-offs (performance, maintainability, security, cost)
  • When you would and would not use it in production

Real-world example

In a production ASP.NET Core application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.

How to explain in the interview

  1. Define the concept in one or two sentences.
  2. Context — where it fits in ASP.NET Core architecture.
  3. Example — a specific project, bug, or performance win.
  4. Trade-off — what you gain vs what you sacrifice.

Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.

Permalink & share

ASP.NET Core ASP.NET Core Tutorial · ASP.NET Core

Create custom rules by inheriting ValidationAttribute:

public class MustBeEvenAttribute : ValidationAttribute {
public override bool IsValid(object value) {
return (int)value % 2 == 0;
}
}

Use like:

[MustBeEven]

public int Number { get; set; }
Permalink & share
Toolliyo Assistant
Ask about tutorials, ebooks, training, pricing, mentor services, and support. I use public site content only—not admin or internal tools.

care@toolliyo.com

Need callback? Share your details