GithubHelp home page GithubHelp logo

velixor / adportal Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 14.77 MB

Учебный проект для практики разработки ASP.NET MVC приложений

C# 77.32% HTML 18.39% CSS 1.71% JavaScript 2.58%

adportal's Introduction

  • Документирование API: swagger
  • ASP.NET Core 3.0
  • база данных: PostgreSQL
  • ОРМ: EF.
  • валидация: FluentValidation
  • мапинг: AutoMaper
  • фильтрация/сортировка/пагинация: Sieve

Сущности

Объявление

  1. Id (guid)
  2. Номер (int)*
  3. Пользователь (guid) ссылка на таблицу*
  4. Текст (string)*
  5. Картинка*
  6. Рейтинг (int)*
  7. Создано (datetime)*

Пользователь

  1. Id (guid)
  2. Имя (string)
  3. Количество объявлений (int)

Реализовать:

  • добавление
  • удаление
  • редактирование
  • поиск.
  • сортировки
  • поиск по всем полям
  • фильтрацию
  • постраничный просмотр
  • один пользователь может опубликовать не более X(брать из настроек) объявлений

Send a request

An example sort/filter/page query:

api/ads

?sorts=     userId,-creationDate        // sort by user, then descendingly by creation date 
&filters=   rating>10, Content@=продам  // filter to ads with more than 10 rating, and a content that contains the phrase "продам"
&page=      1                           // get the first page...
&pageSize=  10                          // ...which contains 10 ads

More formally:

  • sorts is a comma-delimited ordered list of property names to sort by. Adding a - before the name switches to sorting descendingly.
  • filters is a comma-delimited list of {Name}{Operator}{Value} where
    • {Name} is the name of a property with the Sieve attribute or the name of a custom filter method for TEntity
      • You can also have multiple names (for OR logic) by enclosing them in brackets and using a pipe delimiter, eg. (LikeCount|CommentCount)>10 asks if LikeCount or CommentCount is >10
    • {Operator} is one of the Operators
    • {Value} is the value to use for filtering
      • You can also have multiple values (for OR logic) by using a pipe delimiter, eg. Title@=new|hot will return posts with titles that contain the text "new" or "hot"
  • page is the number of page to return
  • pageSize is the number of items returned per page

Notes:

  • You can use backslashes to escape commas and pipes within value fields
  • You can have spaces anywhere except within {Name} or {Operator} fields

Operators

Operator Meaning
== Equals
!= Not equals
> Greater than
< Less than
>= Greater than or equal to
<= Less than or equal to
@= Contains
_= Starts with
!@= Does not Contains
!_= Does not Starts with
@=* Case-insensitive string Contains
_=* Case-insensitive string Starts with
==* Case-insensitive string Equals
!@=* Case-insensitive string does not Contains
!_=* Case-insensitive string does not Starts with

MVC

Account features

adportal's People

Contributors

velixor 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.