You can use either a GraphicsOverlay or a FeatureCollectionLayer to display a layer from a database/datatable. I've summarized some of the key differences below.
For more information see:
For a larger example see: https://github.com/Esri/arcgis-runtime-demos-dotnet/tree/main/src/GeoEventServerSample
But above mentioned links or samples doesn't shows how to create layer with the data from a database. And also I need to select any point/location from the generated layer to show popups with details of that point.
Can you provide me some sample code.?
In the examples above you will write code to query the database/datatable then create features or graphics with geometry, attributes, and a renderer. These examples assume relatively low volumes of data, e.g. 1000s or 10,000s of features/graphics because you will retrieve all the records in one query and add them to the map view.
For larger volumes of data where you want to retrieve data from the database based on a spatial queries. for example as the user pans or zooms the map view, a spatially enabled database and a feature service are recommended. For more information see https://pro.arcgis.com/en/pro-app/latest/help/sharing/overview/introduction-to-sharing-web-layers.ht....