how to log model custom error msg in sql database

23 views Asked by At
  1. Build a Web API named, "DeviceManager" a. Build a model for below details and continue from model[model first]

    Device model:

    i. DeviceId - with regular expression "[A-Z]{3}[0-9]{7}" with error message.

    ii. DeviceName - with regular expression "[A-Z, ], max 50 chars"with error message.

    iii. DeviceIP - with regular expression "std IPv4" with error message.

    iv. HostName - with regular expression "[A-Z, ], max 15 chars" with error message.

    b. Add CRUD operations for above model.

    CustomError model

    i. Id - as Primary Key

    ii. ErrorMessage

    iii. CreatedTime

  2. Add logging mechanism using middleware exception handling to add each action, error and exception and error in DataBase.

  3. Integrate Swagger

0

There are 0 answers