Code Monkey home page Code Monkey logo

eshoponlineapi's People

Contributors

lyquoccuong avatar

Stargazers

 avatar

Watchers

 avatar  avatar

eshoponlineapi's Issues

[SOA-026][Feature] Apply NLog library (just Config and use in Repository).

=====BEFORE=====

1) Describe the requirement

  • I need a library to Log in code.

2) What are the ideas for it?

  • I will use the NLog library for the entire projet.

=====AFTER=====

1) Describe the solutions

2) Pros and Cons of this solution

3) Are there any NEW (technical, code,...) ?

4) Is it challenging and difficult to do? Why?

5) Any other notes?

[SOA-035][Investigation] Investigate ILogger<T> in ASP.NETCore.

=====BEFORE=====
1) Describe the causes why you need to investigate.

  • I want to use a more intensive of NLog.
  • Currently, the way I use NLog in the project is not correct.

2) What are the big questions?

  • I will research to understand the mechanism of ILogger<T> in ASP.Net Core and how to use it.

=====AFTER=====
1) Describe the result

2) Any notes?

[SOA-045][Enhancement] Replace the Hard-Type Casting with using "AS"

=====BEFORE=====

1) Describe the current situation

  • Now: (IEnumerable<CompanyDto>)okObjResult.Value
  • Expected: okObjResult.Value as IEnumerable<CompanyDto>

2) What are the ideas for it?

3) Is it mandatory/optional? What if I don't enhance?

  • It is mandatory. It is good when the object type can NOT be cast.

=====AFTER=====

1) Describe the solutions

2) Pros and Cons of this solution

3) Are there any NEW (technical, code,...) ?

4) Is it challenging and difficult to do? Why?

5) Any other notes?

[SOA-033][Enhancement] Log the FullName of CollectionTypes (IEnumerable, List,...) in MapService.

=====BEFORE=====

1) Describe the current situation

  • Currently, I can NOT log the CollectionType (IEnumerable, List,..) in MapService.

2) What are the ideas for it?

  • Now, I am no idea. I will research it.

3) Is it mandatory/optional? What if I don't enhance?

  • It's Optional but good for watching the logfile.

=====AFTER=====

1) Describe the solutions

2) Pros and Cons of this solution

3) Are there any NEW (technical, code,...) ?

4) Is it challenging and difficult to do? Why?

5) Any other notes?

[SOA-036][Investigation] DEEPER with NLog library.

=====BEFORE=====
1) Describe the causes why you need to investigate.

  • Current. the way I config Nlog in the project is not correct.

2) What are the big questions?

  • Besides the basic features, I want to use & understand the advanced features NLog (custom Config, ...).

=====AFTER=====
1) Describe the result

2) Any notes?

[SOA-021][Investigation] ReverseMapping with "Combined" property in AutoMapper

=====BEFORE=====
Describe the things you will investigate?

  • The combined properties are created by combining at least 2 properties.
  • Examples: FullName = LastName + FirstName
  • AutoMapper also supports ReverseMap() - method
  • Questions - Are there any exceptions when using both ReverseMap() and CombinedProperties?

=====AFTER=====
Describe the result

Any notes?

[SOA-032][Enhancement] Log the content of ExpressionTree into LogFile (using Recursion).

=====BEFORE=====

1) Describe the current situation

  • Currently, I can NOT log the Expression content.

2) What are the ideas for it?

  • Now, I'm no idea. I will research it.

3) Is it mandatory/optional? What if I don't enhance?

  • It is Optional but good for watching LogContent.

=====AFTER=====

1) Describe the solutions

2) Pros and Cons of this solution

3) Are there any NEW (technical, code,...) ?

4) Is it challenging and difficult to do? Why?

5) Any other notes?

[SOA-019][Enhancement] Use the LazyInitialization for RepositoryManager

=====BEFORE=====

1) Why do I have to enhance?

  • During initialization, RepositoryManager will initialize ALL OF its Properties (CompanyRepository, CustomerRepository,...). Even if we haven't used them yet. It's so wasteful.

2) Is it mandatory? What if I don't enhance?

  • Mandatory
  • It can affect performance.

=====AFTER=====

1) Describe the solutions

2) Which and Why do I choose this solution?

3) Are there any NEW (technical, code,...) ?

4) Are there any challenges/difficulties?

5) Any other notes?

[SOA-023][FIXBUG] Missing some configuratons in AutoMapper

=====BEFORE=====

1) Describe the bug

  • AutoMapper doesn't work correctly (error)

2) What may be the root causes (prediction)?

  • Maybe forget to register the Profiles config in ServiceCollections.

=====AFTER=====

1) Describe the solutions (explain the root causes)

2) Pros and Cons of this solution

3) Are there any NEW (technical, code,...) ?

4) Is it challenging and difficult to do? Why?

5) Any other notes?

[SOA-037][Fixbug] Disable ILoggerService interface (using NLog WRONG way)

=====BEFORE=====

1) Describe the current situation

  • Currently, I am using NLog WRONG.

2) What are the ideas for it?

  • I will disable the ILoggerService interface in entire projects.
  • Next step, I will re-config the NLog on the project.

3) Is it mandatory/optional? What if I don't enhance?

  • It is mandatory.

=====AFTER=====

1) Describe the solutions

2) Pros and Cons of this solution

3) Are there any NEW (technical, code,...) ?

4) Is it challenging and difficult to do? Why?

5) Any other notes?

[SOA-020][Enhancement] Rename "BaseEntity" class to "AbstractEntity" class

=====BEFORE=====

1) Describe the situations

  • "Base" in the name is not consistent with Entire Projects (AbstractReposiotry,...)

2) Why do I have to enhance?

  • Replacing "Base" with "Abstract" in the name class makes it consistent with Entire Projects.

3) Is this enhancement mandatory? What if I don't enhance?

  • It's optional. But these changes help the code clear.

=====AFTER=====

1) Describe the solutions

2) Which and Why do I choose this solution?

3) Are there any NEW (technical, code,...) ?

4) Are there any challenges/difficulties?

5) Any other notes?

[SOA-041][Feature] Automatically create the Database if NOT existing.

=====BEFORE=====

1) Describe the requirement

  • Automatically create the Database if it is NOT existing in SQL Server.

2) What are the ideas for it?

  • Have some methods support this feature.

=====AFTER=====

1) Describe the solutions

2) Pros and Cons of this solution

3) Are there any NEW (technical, code,...) ?

4) Is it challenging and difficult to do? Why?

5) Any other notes?

[SOA-025][Enhancement] Add [FromRoute] and NameMethod to the GET requests (Controllers)

=====BEFORE=====

1) Describe the current situation

  • Add [FromRoute] to Parameters of GET - Controllers

2) What are the ideas for it?

3) Is it MANDATORY or OPTIONAL? What if I don't enhance?

  • It's OPTIONAL. But it makes the code clear.

=====AFTER=====

1) Describe the solutions

2) Pros and Cons of this solution

3) Are there any NEW (technical, code,...) ?

4) Is it challenging and difficult to do? Why?

5) Any other notes?

[SOA-029][Enhancement] Log the messages for entire the Controllers.

=====BEFORE=====

1) Describe the current situation

  • Currently, the Controllers module is missing logging messages.

2) What are the ideas for it?

  • Using ILogService to log messages.

3) Is it mandatory/optional? What if I don't enhance?

  • It's mandatory. I will apply it for entire the project.

=====AFTER=====

1) Describe the solutions

2) Pros and Cons of this solution

3) Are there any NEW (technical, code,...) ?

4) Is it challenging and difficult to do? Why?

5) Any other notes?

[SOA-028][Enhancement] Log the messages for entire the Business (Service).

=====BEFORE=====

1) Describe the current situation

  • Currently, the Business module is missing logging messages.

2) What are the ideas for it?

  • Using ILogService to log messages.

3) Is it mandatory/optional? What if I don't enhance?

  • It's mandatory. I will apply it for entire the project.

=====AFTER=====

1) Describe the solutions

2) Pros and Cons of this solution

3) Are there any NEW (technical, code,...) ?

4) Is it challenging and difficult to do? Why?

5) Any other notes?

[SOA-039][FIXBUG] RE-Apply NLog - using ILogger<T> in entire project (remove OldCodes)

=====BEFORE=====

1) Describe the bug

  • After re-configuring the NLog, I will apply using ILogger<T> in Business.

2) What may be the problems (prediction)?

  • The problem is Business does NOT use the DI mechanism, but LazyInitialization<T>

=====AFTER=====

1) Describe the solutions (explain the root causes)

2) Pros and Cons of this solution

3) Are there any NEW (technical, code,...) ?

4) Is it challenging and difficult to do? Why?

5) Any other notes?

[SOA-024][Enhancement] Separate "ApiControllers" from "ApiHost".

=====BEFORE=====

1) Describe the current situation

  • Currently, eShopOnlineApiHost is containing the Controllers class.
  • It's not a good practice. Because Host was referenced by a lot of sub-modules (Repositories, Business, Utilities,..) to register DI.
  • Because Controllers were being put in the same place, they can use these references (even if they actually don't need them).

2) What are the ideas for it?

  • I will separate it into a new module (eShopOnlineApiRestful)

3) Is it mandatory/optional? What if I don't enhance?

  • It is optional. But I still do it (for easy to maintain in the future).

=====AFTER=====

1) Describe the solutions

2) Pros and Cons of this solution

3) Are there any NEW (technical, code,...) ?

4) Is it challenging and difficult to do? Why?

5) Any other notes?

[SOA-046][Enhancement] Move code "CheckDeleteConditions" from Repositories to Business (for writing UnitTest)

=====BEFORE=====

1) Describe the current situation

  • Because Repositories can NOT write UnitTest and "CheckDeleteCondition" code stays in Repositories.
  • Need to move this code to the Business module.

2) What are the ideas for it?

3) Is it mandatory/optional? What if I don't enhance?

  • It is mandatory for writing UnitTest these methods.

=====AFTER=====

1) Describe the solutions

2) Pros and Cons of this solution

3) Are there any NEW (technical, code,...) ?

4) Is it challenging and difficult to do? Why?

5) Any other notes?

[SOA-040][Enhancement] Modify "ConnectionString" with Username, Password (Development)

=====BEFORE=====

1) Describe the current situation

  • Currently, the ConnectionString is NOT using Account (Username, Password) to login SQL.

2) What are the ideas for it?

  • Create a ConnectionString for production (using Username / Password) to log in.

3) Is it mandatory/optional? What if I don't enhance?

  • It's mandatory. The practical situation is always ConnectionString with Account.

=====AFTER=====

1) Describe the solutions

2) Pros and Cons of this solution

3) Are there any NEW (technical, code,...) ?

4) Is it challenging and difficult to do? Why?

5) Any other notes?

[SOA-043][Enhancement] Change code from Synchronous To Asynchronous

=====BEFORE=====

1) Describe the current situation

  • Currently, the code is running on Synchronous. It is NOT good for performance.

2) What are the ideas for it?

  • I will change entire codes in the project to Asynchronous for better performance.

3) Is it mandatory/optional? What if I don't enhance?

  • It's mandatory.
  • If you don't apply it, actually nothing is wrong but your performance is not optimized.

=====AFTER=====

1) Describe the solutions

2) Pros and Cons of this solution

3) Are there any NEW (technical, code,...) ?

4) Is it challenging and difficult to do? Why?

5) Any other notes?

[SOA-030][Enhancement] Rename "IMapperService" to "IMapService"

=====BEFORE=====

1) Describe the current situation

  • "IMapperService" is not consistent with "ILogService".

2) What are the ideas for it?

  • I will change "IMapperService" to "IMapService" for consistency.

3) Is it mandatory/optional? What if I don't enhance?

  • It's Optional but good.

=====AFTER=====

1) Describe the solutions

2) Pros and Cons of this solution

3) Are there any NEW (technical, code,...) ?

4) Is it challenging and difficult to do? Why?

5) Any other notes?

[SOA-027][Enhancement] Re-structure the code to handle the Delete Conditions.

=====BEFORE=====

1) Describe the current situation

  • Currently, I am using Delete Condition Enums for each Entity. It's difficult to summarize the number of conditions for writing LogMessages.

2) What are the ideas for it?

  • I will collect all conditions into one place (ConditionsForDeletingEntityCollection). Each Entity will be assigned the needed condition from it.

3) Is it mandatory/optional? What if I don't enhance?

  • It's mandatory for managing conditions and writing LogMessages.

=====AFTER=====

1) Describe the solutions

2) Pros and Cons of this solution

3) Are there any NEW (technical, code,...) ?

4) Is it challenging and difficult to do? Why?

5) Any other notes?

[SOA-018][Enhancement] Create "RepositoryParams" class (contains all parameters)

=====BEFORE=====

1) Describe the situations

  • Parameters used for Repository's Constructor are so many (Context, RepositoryManager, IMapper,..).

2) Why do I have to enhance?

  • It makes more effort to modify Constructors when there are any changes in a list of parameters.

3) Is this enhancement mandatory? What if I don't enhance?

  • No, it is optional.
  • Make more effort to modify the Constructor if there are any changes in a list of parameters.

=====AFTER=====

1) Describe the solutions

2) Which and Why do I choose this solution?

3) Are there any NEW (technical, code,...) ?

4) Are there any challenges/difficulties?

5) Any other notes?

[SOA-022][Enhancement] "SaveChanges" feature in RepositoryManager (missing)

=====BEFORE=====

1) Describe the current situation

  • I need a method that will SaveChanges() to the Database.
  • I forgot this method when building the Repositories module.

2) What are the ideas for it?

  • Ignore

3) Is it mandatory/optional? What if I don't enhance?

  • It's compulsory to save the changes to the Database.

=====AFTER=====

1) Describe the solutions

2) Pros and Cons of this solution

3) Are there any NEW (technical, code,...) ?

4) Is it challenging and difficult to do? Why?

5) Any other notes?

[SOA-017][Enhancement] Rename "IsRemoved" property to "IsDeleted" in BaseEntity class

=====BEFORE=====

1) Describe the situations

  • The "IsRemoved" property has the same name as the Remove() method - EFCore. But they have different meanings.

2) Why do I have to enhance?

  • Due to the misunderstanding, EFCore has the Remove() method which actually deletes the record in the Database. But our intention just wants to use this field as a soft delete.

3) Is this enhancement mandatory? What if I don't enhance?

  • Other developers can be misunderstood when using them.

=====AFTER=====

1) Describe the solutions

2) Which and Why do I choose this solution?

3) Are there any NEW (technical, code,...) ?

4) Are there any challenges/difficulties?

5) Any other notes?

[SOA-006][Feature] Build DTOs and apply AutoMapperLib

=====BEFORE=====
Describe details of the Feature

1) What's DTO?

  • We use DTOs (Data Transfer Objects) to return data from the Repositories Layer to the Controllers.
  • DTOs are also used to take the input_params from Requests.

2) What's AutoMapper library?

  • AutoMapperLib supports mapping the data fields between 2 objects.
  • We use it to map data between Entities (of Domains) and DTOs (returning to Controllers).

3) Why don't return Entities (Domains) instead of creating DTOs?

  • Because Entities are used to map to the tables in the Database (that is its main purpose). Inside Entities also have Navigational Properties and we don't want to map them in API's Response.
  • Moreover, there are situations where we want to map all the properties from a model class to the result โ€” but still, we want to use DTO instead. The reason is if we change the database, we also have to change the properties in a model.

=====AFTER=====
Are there any NEW (technical, code,...) ?

Are there any challenges?

Any notes?

[SOA-031][Enhancement] Optimize the structure of Loging the ContentFile.

=====BEFORE=====

1) Describe the current situation

  • The current structure is very bad. There is too much-duplicated information.

2) What are the ideas for it?

  • Design a new structure.

3) Is it mandatory/optional? What if I don't enhance?

  • It's mandatory for watch Log easily.

=====AFTER=====

1) Describe the solutions

2) Pros and Cons of this solution

3) Are there any NEW (technical, code,...) ?

4) Is it challenging and difficult to do? Why?

5) Any other notes?

[SOA-034][Enhancement] Log the "SQL statement" which were generated by EFCore.

=====BEFORE=====

1) Describe the current situation

  • Currently, I want to watch the SQL statements sent to SQL Server.

2) What are the ideas for it?

  • I will research to find the solution.

3) Is it mandatory/optional? What if I don't enhance?

  • It's mandatory. It helps me trace issues or optimize the code easily.

=====AFTER=====

1) Describe the solutions

2) Pros and Cons of this solution

3) Are there any NEW (technical, code,...) ?

4) Is it challenging and difficult to do? Why?

5) Any other notes?

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.