Naija.LGA.Net
1.0.0
See the version list below for details.
dotnet add package Naija.LGA.Net --version 1.0.0
NuGet\Install-Package Naija.LGA.Net -Version 1.0.0
<PackageReference Include="Naija.LGA.Net" Version="1.0.0" />
paket add Naija.LGA.Net --version 1.0.0
#r "nuget: Naija.LGA.Net, 1.0.0"
// Install Naija.LGA.Net as a Cake Addin #addin nuget:?package=Naija.LGA.Net&version=1.0.0 // Install Naija.LGA.Net as a Cake Tool #tool nuget:?package=Naija.LGA.Net&version=1.0.0
Naija.LGA.Net
This package provides a simple way to retrieve data about Nigerian states and their Local Government Areas (LGAs). Designed for developers working with location-based services or administrative data in Nigeria.
Features
- Retrieve all states in Nigeria.
- Get a specific state by its ID or name.
- Access comprehensive lists of Local Government Areas (LGAs) for each state.
- Lightweight and easy-to-integrate.
Installation
Add the package to your project via your package manager. Example for NuGet Package Manager:
Install-Package Naija.LGA.Net
Or via the .NET CLI:
dotnet add package Naija.LGA.Net
Usage
Below is an example of how to use the NaijaLGA to access state and LGA data.
using System;
using System.Linq;
class Program
{
static void Main(string[] args)
{
// Retrieve all states
var states = NaijaLGA.GetStates();
Console.WriteLine($"Total states: {states.Count()}");
// Retrieve a state by ID
var state = NaijaLGA.GetState(36); // Example: Get state with ID 36
Console.WriteLine($"State Name: {state.Name}");
// Retrieve a state by name
var imo = NaijaLGA.GetState("Imo");
Console.WriteLine($"Imo LGAs: {string.Join(", ", imo.LGAs.Select(l => l.Name))}");
}
}
Explanation of Methods
GetStates
- Returns a list of all Nigerian states.
- Example:
var states = NaijaLGA.GetStates(); Console.WriteLine(states.Count());
GetState(int id)
- Retrieves a specific state by its ID.
- Example:
var state = NaijaLGA.GetState(36); Console.WriteLine(state.Name);
GetState(string name)
- Retrieves a state by its name (case-insensitive).
- Example:
var imo = NaijaLGA.GetState("Imo");
Data Structure
State Object
- Id (int): Unique identifier for the state.
- Name (string): Name of the state.
- Capital (string): Capital for the state.
- LGAs (List<Lga>): List of Local Government Areas within the state.
LGA Object
- Id (int): Unique identifier for the LGA.
- Name (string): Name of the LGA.
Contributing
Contributions are welcome! If you have suggestions or improvements, please submit a pull request or open an issue in the repository
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version 1.0.0
Initial Release
- Features:
- Comprehensive data set of Nigeria's states and their respective LGAs.
- Retrieve a list of all states using `GetStates`.
- Fetch details of a specific state using its ID or name with `GetState`.
- Optimized for simplicity and ease of integration into applications.
- Designed to support applications requiring Nigerian geographic data.
- Usage Examples:
var states = NaijaLGA.GetStates();
Console.WriteLine(states.Count());
var state = NaijaLGA.GetState(36);
var imo = NaijaLGA.GetState("Imo");
- Future Enhancements:
- Addition of utility methods for more specific queries.
- Potential integration of population and demographic data.
- API support for dynamic data fetching.