79487831

Date: 2025-03-05 22:40:56
Score: 0.5
Natty:
Report link

for MongoDB use

services.AddDbContext<DBContext>(
    options => options.UseMongoDB(<ConnectionString>, <DatabaseName>),
    ServiceLifetime.Transient
);

Where ConnectionString is:

$"mongodb+srv://{UserName}:{Password}@{ClusterName}/{AuthDatabase}?retryWrites=true&w=majority&appName={AppName}"
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: pallav deshmukh