Skip to content

Conversation

@Tatiana2424
Copy link
Contributor

dev

JIRA

Code reviewers

  • @github_username

Second Level Review

  • @github_username

Summary of issue

ToDo

Summary of change

ToDo

Testing approach

ToDo

CHECK LIST

  • СI passed
  • Сode coverage >=95%
  • PR is reviewed manually again (to make sure you have 100% ready code)
  • All reviewers agreed to merge the PR
  • I've checked new feature as logged in and logged out user if needed
  • PR meets all conventions

Comment on lines 5 to 11

public int Id;

public decimal Latitude;

public decimal Longtitude;

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А шо по відступах в нас?

Comment on lines 22 to 28
Fact fact = new Fact();
fact.Id = 1;
fact.Title = "Test1";
FactDTO factDTO = _mapper.Map<Fact, FactDTO>(fact);

return factDTO.Title;
// return _repositoryWrapper.FactRepository.GetFactsByStreetcode();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add TODO here to clean this after merge

Comment on lines 6 to 8
public void GetAudioAsync();
public void UploadAudioAsync();
public void DeleteAudioAsync();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can remove these duplicated methods from all repository's interfaces and just inherit them from IRepositoryBase


public string GetSubtitlesByStreetcode()
{
return "GetSubtitlesByStreetcode";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add TODO for all code that we will have to clean

Comment on lines 28 to 31
public string GetFactsByStreetcode()
{
_loggerService.LogError("Error????????");
return _factService.GetFactsByStreetcode();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use Async

Comment on lines 1 to 2
using EPlast.BLL.Interfaces.Logging;
using EPlast.BLL.Services.Logging;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very strange namespace

Copy link
Contributor

@AleXLaeR AleXLaeR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please thouroughly review my comments & impovement suggestions.

Comment on lines 27 to 29
public DateTime StartDate;

public DateTime EndDate;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make these column names compliant with Streetcode Entity.


public List<ImageDTO> Images;

public int Code;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make this column name compliant with Streetcode Entity.


public DateTime EndDate;

public int NumberOfViews;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make this column name compliant with Streetcode Entity.

Comment on lines 33 to 35
public DateTime CreateDate;

public DateTime UpdateDate;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make these column names compliant with Streetcode Entity.

Comment on lines 8 to 10
public int Id;

public string Title;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extract "id-title" pattern to its own DTO (ex. IdentifierDTO).

void GetById();

public void GetAll();
IQueryable<T> GetAll();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When working with IQueryable interface, we are posing a "question", applying all necessary filters right off the bat.
Hence the method's name should be "FindAll" and not "GetAll".

IQueryable<T> GetAll();

public void GetAllAsync();
Task<IEnumerable<T>> GetAllAsync();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, it wouldn't hurt to add optional Expressions/Predicates, bound to default/null by default.

Comment on lines 7 to 11
void Create();

public void CreateAsync();
Task CreateAsync();

public void GetById();
void GetById();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where are method parameters?
GetById should have an integer id, Create/Update/Delete should have an entity of generic type T.

namespace StreetCode.DAL.Repositories.Interfaces.Base;

public interface IRepositoryBase
public interface IRepositoryBase<T>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a side note, during the latter stages of our development plan we would surely face the need insome form of conditional fetching of only one entity from the repo.
Hence, the base repo interface must be supplied with FirstOrDefaultAsync/SingleOrDefaultAsync methods.

Comment on lines 30 to 33
services.AddScoped(typeof(ILoggerService<>), typeof(LoggerService<>));
services.AddScoped<IFactService, FactService>();
services.AddScoped<IMediaService, MediaService>();
services.AddScoped<IPartnersService, PartnersService>();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please divide intergration of built-in services and custom ones into their own extension methods.

Copy link
Contributor

@AleXLaeR AleXLaeR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All done great.

Copy link
Collaborator

@LanchevychMaxym LanchevychMaxym left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@Tatiana2424 Tatiana2424 merged commit b7ddc42 into master Dec 14, 2022
@AleXLaeR AleXLaeR deleted the mapper-and-repository branch December 23, 2022 14:03
@arisssha arisssha mentioned this pull request May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants