Giter VIP home page Giter VIP logo

clothingstore's Introduction

ClothingStore

ASP.NET Core Web API that handle clothing store transaction

Entities architecture:

  • Products
  • Catgories - Each product is assigned to category, e.g Underwear.
  • Policies - Describes the policies to control ceratin transactions such as return. Each category is assigned to policy.
  • Credits - Describes the credit issued following returns.
  • Transcations - Describes the purchases and returns transactions.
  • Items - Describes the products that were purchased or returened in a transaction.
  • Emploees
  • Departments
  • Manufacturers

Software architecture:

The solution includes 3 projects:

  • Repository.Common - Contains the common objects such as Specifications
  • Repository.Interface - Contains the interfaces and models
  • Repository.Sql - Contains the Sql implemetation of the repositories and the DbContext
  • ClothingStoreApi - Contains the Api's, i.e. the controllers

Notes:

  • The solution uses ASP.NET core native IoC container to implement Depandency Injection and Dependency Inversion.
  • Statistics control is based on the Specifications design pattern keeping the Open/Close principle
  • Each entity model is supported by separate repository.
  • All the similar code for handeling purchases and returnes is handled in SqlTransactionRepository.
  • Single Generic interface IRepositort is used for all repositories

API's:

  • Purchases
  • Returns
  • Inventories
  • Statistics

Examples of calling the API's

Add purchase:

  • //api/purchases

  • HttpPost

  • body

    { "Date": "11.3.2018", "EmploeeId": 1, "Tax": 10, "Total": 50, "Items": [ { "ProductId":3

      	},
      	{	
      		"ProductId":4}
      ]
    

    }

Update Return:

  • //api/returns

  • HttpPut

  • body

    { "Id": 1047 "Date": "11.4.2018", "EmploeeId": 3, "Tax": 10, "Total": 70, "Items": [ { "Id": 1112 "ProductId":4

      	},
      	{	"Id": 1113
      		"ProductId":3}
      ]
    

    } Get Month statistics:

  • HttpGet

  • //api/statistics/byMonth?month=m&year=y

clothingstore's People

Contributors

dkonst001 avatar

Watchers

James Cloos avatar  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.