Code Monkey home page Code Monkey logo

intintern2grow_backend_.net_firsttask_crud's Introduction

First Task in Intern2grow Back-end

Task Description

The task is to implement a Blogger API that allows users to perform the following actions:

  1. Creation: Users can create a new blog post by providing the content and attaching an image.
  2. Update: Users can update their existing blog posts by providing new content and the post ID.
  3. Read: Users can retrieve all the posts from the database with pagination, displaying the first 10 posts per page.
  4. Delete: Users can delete their blog posts by specifying the post ID.

Tools Used

For this project, I used the following tools and technologies:

  • .NET Core 7: The framework used for building the Web API.
  • Entity Framework: A popular Object-Relational Mapping (ORM) tool for working with databases in .NET applications.
  • LINQ: Language-Integrated Query (LINQ) is used to query data from different data sources.
  • Fluent API: A flexible and powerful way to configure the Entity Framework models and relationships.
  • Code First (Migration): The Code First approach allows the database schema to be generated from the code.

Getting Started

To run this project locally, please follow these steps:

  1. Clone the repository to your local machine.
  2. Install the required dependencies using the package manager or NuGet.
  3. Configure the database connection string in the appsettings.json file.
  4. Run the database migrations to create the necessary tables and schema.
  5. Build and run the project.
git clone https://github.com/your-username/your-repository.git
cd your-repository
dotnet restore
# Update the database connection string in appsettings.json
dotnet ef database update
dotnet build
dotnet run
  

Once the project is running, you can access the Blogger API endpoints using a tool like Postman or any web browser.

API Endpoints

The following API endpoints are available:

  • POST /api/posts: Create a new blog post.
  • PUT /api/posts/{id}: Update an existing blog post by ID.
  • GET /api/posts: Retrieve all blog posts with pagination.
  • DELETE /api/posts/{id}: Delete a blog post by ID.

Thank you for your interest and contribution!

intintern2grow_backend_.net_firsttask_crud's People

Contributors

abdulrhaman-mohamed avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.