Last week I didn’t do much coding. In fact, all I did was playing a little with ReSharper and adding some ‘flesh’ to my app’s skeleton. ReMaster is able to connect to a database now and log errors when they occur. It also has some interfaces that may be useful later (when I start coding the model).
Not a big thing but I wanted to rethink the project structure a few times (basically because I rarely have an opportunity to code a web app from a scratch so it was loads of fun!). And yes, I know there is at least one open source project that provides a starting point for ASP.Net Core MVC. But because it’s my pet project I can do with it whatever I want and if I decide to starve it to death, I will starve it to death, got it?! 😉
But coming back to my app’s topic, you may think about…
How to get all the Polish companies’ data?
All Polish companies are present in a system called CEIDG (in English: Central Registration and Information on Business). It provides a simple API – so far so good.
To integrate with it, you have to register in their system, where you are asked about some personal data – first name, full name and even PESEL (which is a unique, personal number assigned to every Pole but isn’t required very often so I have mixed feelings here). Anyway, you register and then you can login to CEIDG to retrieve a key that is required to use API. If you don’t want to use it, you can choose another integration option – files with data to import. You choose it at the moment of registration and I can’t find a way to change it later… But maybe I don’t look hard enough? Anyway, it’s a pity…
As for my app – I have registered and started adding an API to it. And you know what? There is no ‘Add Service Reference…’ option!
‘Microsoft must have renamed it! Let’s google it!’, was all I thought :). Google gave me this answer. In short – you cannot add a service reference using an IDE, but you can code a custom workaround. Well…
Luckily, the thread above was quite old and in 2016 Microsoft made some steps to help the developers. So you probably ask…
“How to add a service reference to my ASP.Net Core MVC project”?
Well, I knew you’d ask! In fact, I’m working on a separate post on this subject, so if you need to add a reference, you will be saved soon… As long as you use VS2015 because if you use VS2017 then well, I’m sorry for you!
Just kidding, there is also a workaround for VS2017!
Well, now I will just test some approaches of saving data from the API and decide on the fastest one.
After downloading all the companies’ data, I will probably focus on a ‘normal’ user functionality, like searching for a company or adding some details about the recruitment process. But I will let you know about this in a separate post.
I will also try out Security Manager – a .Net Core tool used to prevent sending sensitive data to a repository by accident. It looks promising and if it’s really as great as its developers suggests, it’s a shame Microsoft doesn’t provide such a tool for ‘classic ‘ .Net.
At the end of this post, I have to admit, It’s really great fun to have no real deadlines and being able to actually play with the code and at the same time have enough motivation to actually push the project further!