[ DOT NET Core MCQS ]

झारखंड में आयोजित होने वाली JPSC, JSSC, JET, झारखंड पुलिस भर्ती परीक्षा आदि के लिए उपयोगी सामान्य अध्ययन।

[ DOT NET Core MCQS ]

Useful GK for JPSC, JSSC, JET, Jharkhand Police and other exams.
791. Connection String प्राप्त करने के लिए IConfiguration की कौन सी Method उपयोग होती है?
[A] GetConnectionString()
[B] GetDatabase()
[C] ReadConnection()
[D] OpenConnection()
791. Which IConfiguration method is used to retrieve a connection string?
[A] GetConnectionString()
[B] GetDatabase()
[C] ReadConnection()
[D] OpenConnection()
सही उत्तर: GetConnectionString()
व्याख्या: ConnectionStrings Section से Value प्राप्त करती है।
Correct Answer: GetConnectionString()
Explanation: Retrieves value from ConnectionStrings section.
792. Production Environment में Sensitive Connection String Store करने का बेहतर तरीका क्या है?
[A] Environment Variables
[B] Controller
[C] View
[D] CSS File
792. What is a better way to store sensitive connection strings in production?
[A] Environment Variables
[B] Controller
[C] View
[D] CSS File
सही उत्तर: Environment Variables
व्याख्या: Security के लिए Sensitive Data Source Code से बाहर रखी जाती है।
Correct Answer: Environment Variables
Explanation: Keeps sensitive data outside source code for security.
793. ASP.NET Core MVC में Model क्या होता है?
[A] Data और Business Logic को Represent करता है
[B] UI को Represent करता है
[C] Routing को Represent करता है
[D] Middleware को Represent करता है
793. What is a Model in ASP.NET Core MVC?
[A] Represents Data and Business Logic
[B] Represents UI
[C] Represents Routing
[D] Represents Middleware
सही उत्तर: Data और Business Logic को Represent करता है
व्याख्या: Model Application Data और Business Rules को Manage करता है।
Correct Answer: Represents Data and Business Logic
Explanation: Model manages application data and business rules.
794. Model Class सामान्यतः कहाँ बनाई जाती है?
[A] Models Folder
[B] Views Folder
[C] Controllers Folder
[D] wwwroot Folder
794. Where are Model classes usually created?
[A] Models Folder
[B] Views Folder
[C] Controllers Folder
[D] wwwroot Folder
सही उत्तर: Models Folder
व्याख्या: सभी Entity Classes सामान्यतः Models Folder में रखी जाती हैं।
Correct Answer: Models Folder
Explanation: Entity classes are typically placed in the Models folder.
795. Entity Framework Core में Model किसे कहा जाता है?
[A] Entity Class
[B] Controller
[C] View
[D] Middleware
795. In Entity Framework Core, what is called a Model?
[A] Entity Class
[B] Controller
[C] View
[D] Middleware
सही उत्तर: Entity Class
व्याख्या: Database Table को Represent करने वाली Class।
Correct Answer: Entity Class
Explanation: A class that represents a database table.
796. Model में Primary Key को कैसे पहचानता है EF Core?
[A] Id Property
[B] Name Property
[C] Email Property
[D] Address Property
796. How does EF Core identify a primary key by convention?
[A] Id Property
[B] Name Property
[C] Email Property
[D] Address Property
सही उत्तर: Id Property
व्याख्या: Id या ClassNameId Convention से Primary Key Detect होती है।
Correct Answer: Id Property
Explanation: Id or ClassNameId is detected as primary key.
797. Data Annotation [Key] का उपयोग किसलिए होता है?
[A] Primary Key Define करने के लिए
[B] Foreign Key Define करने के लिए
[C] Validation के लिए
[D] Routing के लिए
797. What is the purpose of [Key] attribute?
[A] Define Primary Key
[B] Define Foreign Key
[C] Validation
[D] Routing
सही उत्तर: Primary Key Define करने के लिए
व्याख्या: Primary Key Explicitly Define करती है।
Correct Answer: Define Primary Key
Explanation: Explicitly defines the primary key.
798. [Required] Attribute क्या करती है?
[A] Field Mandatory बनाती है
[B] Field Hidden बनाती है
[C] Field Delete करती है
[D] Field Encrypt करती है
798. What does [Required] attribute do?
[A] Makes Field Mandatory
[B] Hides Field
[C] Deletes Field
[D] Encrypts Field
सही उत्तर: Field Mandatory बनाती है
व्याख्या: Null Value Allow नहीं करती।
Correct Answer: Makes Field Mandatory
Explanation: Does not allow null values.
799. String Length Limit करने के लिए कौन सा Attribute उपयोग होता है?
[A] StringLength
[B] Required
[C] Range
[D] Key
799. Which attribute is used to limit string length?
[A] StringLength
[B] Required
[C] Range
[D] Key
सही उत्तर: StringLength
व्याख्या: Maximum Length Define करता है।
Correct Answer: StringLength
Explanation: Defines maximum length.
800. [MaxLength] Attribute का उपयोग किसलिए होता है?
[A] Maximum Character Length Define करने के लिए
[B] Minimum Character Length Define करने के लिए
[C] Primary Key Define करने के लिए
[D] Foreign Key Define करने के लिए
800. What is [MaxLength] used for?
[A] Define Maximum Character Length
[B] Define Minimum Character Length
[C] Define Primary Key
[D] Define Foreign Key
सही उत्तर: Maximum Character Length Define करने के लिए
व्याख्या: Database Column Length निर्धारित करती है।
Correct Answer: Define Maximum Character Length
Explanation: Determines database column length.