Database Restriction

Hello people, i am developping a software based on Chirpstack Application Server. I know it has an API but i prefer to not use it, so i scaffold the database in my MVC project with EF and a postgress plugin.

Everything goes well, i madae changes on the database and i was very happy…but…but…when i tried to use the application server and it shows an error saying that the database dont recognize a connection.

I deleted the database and i started again, i add a Network Server and worked fine, so i started that everything goes well, but, then i created a service profile and when i go to the web app and i want to edit the profile i just added it says this item does not exist.
When i created a ServiceProfile with the GUI ask me for information that i dont see in the ServiceProfile table…

This is my ServiceProfile Class… can someone help me?

public partial class ServiceProfile
    public ServiceProfile()
        Applications = new HashSet<Application>();
        MulticastGroups = new HashSet<MulticastGroup>();

    public Guid ServiceProfileId { get; set; }
    public long OrganizationId { get; set; }
    public long NetworkServerId { get; set; }
    public DateTime CreatedAt { get; set; }
    public DateTime UpdatedAt { get; set; }
    public string Name { get; set; }

    public virtual NetworkServer NetworkServer { get; set; }
    public virtual Organization Organization { get; set; }
    public virtual ICollection<Application> Applications { get; set; }
    public virtual ICollection<MulticastGroup> MulticastGroups { get; set; }

Is there something we can do to access to the database and writ

I get the conclusion that the

I do not think this is a sustainable approach. The database schema can and frequently does change with each release. Additionally, you have no idea how the application server may be interacting with the database while you are trying to modify it.

The API is stable, I recommend using it.

1 Like

I dont have problems to use the API, but i am trying to create a network server with postman with the example given in the API and doesn’t work at all.

This is my body and i get only errors…

“serviceProfile”: {
“addGWMetaData”: false,
“channelMask”: “string”,
“devStatusReqFreq”: 0,
“dlBucketSize”: 0,
“dlRate”: 0,
“dlRatePolicy”: “DROP”,
“drMax”: 0,
“drMin”: 0,
“hrAllowed”: true,
“id”: “string”,
“minGWDiversity”: 0,
“name”: “string”,
“networkServerID”: “3”,
“nwkGeoLoc”: true,
“organizationID”: “1”,
“prAllowed”: true,
“raAllowed”: true,
“reportDevStatusBattery”: true,
“reportDevStatusMargin”: true,
“targetPER”: 0,
“ulBucketSize”: 0,
“ulRate”: 0,
“ulRatePolicy”: “DROP”

It says, Network Server must not be nil… and i need to provide the ID?
My first option was the API, i tried the EF option because i cant make the api works, and in the API i need to provide information that i thinks is not used for nothing…

I need this working, by API or by EF… i dont have problems with API but if i make EF to work is less work for me…

in the case of the ServiceProfile i dont know why is not working, i gived all the information the table need…

In chase of the network server it works great…

I added an organization by EF and worked perfectly, right now i am having problems only with the service profile. i tried several times to make the API works, i dont know whats i am doing wrong.

Can someone help me?

I dont know wht you understand by stable, in the documentation to create a service profile it ask us by the id, and the ID in the Database is identity…so, i am missiong something?