Skip to content

Conversation

@yaschete
Copy link
Collaborator

  • .Net6 Upgrade
  • Updated program.cs as a .net6 new coding style and removed startup.cs.
  • Code refactor
  • Removed unnecessary codes and infrastructure for Carbon.Sample app.
  • Created new todo development points for Carbon library.

@kocdigital kocdigital deleted a comment from keremaytac Mar 13, 2023
namespace Carbon.Sample.API.Application.Controllers
{
[ApiController]
[Route("api/v1/[controller]")]
Copy link
Contributor

Choose a reason for hiding this comment

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

Route kısmı basede olması sıkıntı olabilir; v1,v2 gibi versiyon bazlı controller ve ya routları yönetmeye başlamamız lazım. Base de olursa hep v1 olarak gidebilir. Bu nedenle route u controller a alıp ilgili kullanımı ile alakalı da ufak bir summary yazarsak süper olur

{
if (context.InstanceToValidate == null)
{
result.Errors.Add(new ValidationFailure()
Copy link
Contributor

Choose a reason for hiding this comment

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

Buraya bir TODO ekleyelim mi? Error handlig konusun ilerleyişine göre yeniden değerlendirelim burayı

}
public interface ISampleRepository : IRepository<SampleEntity>, ISolutionFilteredRepository, IOwnershipFilteredRepository
{
Task<SampleEntity> GetByIdAsync(Expression<Func<SampleEntity, bool>> filters);
Copy link
Contributor

Choose a reason for hiding this comment

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

Metot ismi ve parametre uyumuna tekrar bakalım, parametre olarak id alsak daha mantıklı metot ismine göre

Copy link
Contributor

Choose a reason for hiding this comment

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

Bir TODO ekleyelim mi buraya da? Error handlig konusundan sonra tekrar bakalım buraya

services.AddScoped<ISampleService, SampleService>();
}

public static void AddCustomCors(this IServiceCollection serviceCollection, string cors)
Copy link
Contributor

Choose a reason for hiding this comment

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

application.UseHsts();
application.UseHttpsRedirection();
application.UseCustomRequestLocalization();
app.CreateAuthentication("RAM");
Copy link
Contributor

Choose a reason for hiding this comment

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

Burada RAM kısmı için bir açıklama ekleyelim; neden buraya RAM yazdı vb bilmesi için

"environmentVariables": {
"CONFIGURATION_TYPE": "FILE",
"FILE_CONFIG_PATHS": "appsettings.Development.json",
"FILE_CONFIG_PATHS": "appsettings.kube_test.json",
Copy link
Contributor

Choose a reason for hiding this comment

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

Proje içerisinde bir app setting bırakalım; bu appsettingsde şifre, url vb olmamalı. Ortamlar, uygulama nasıl debug edilir neler gereklidir bunun için ayrı bir eğitim içeriği olmalı.

"FILE_CONFIG_PATHS": "appsettings.kube_test.json",
"ENVIRONMENT_TYPE": "Kestrel",
"ASPNETCORE_ENVIRONMENT": "Development"
"ASPNETCORE_ENVIRONMENT": "kube_test"
Copy link
Contributor

Choose a reason for hiding this comment

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

Development kalması daha sağlıklı

Copy link
Contributor

Choose a reason for hiding this comment

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

Error handling konusundan sonra bu resxler ne olacak vb buraya geri dönmeyi unutmayalım

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
Copy link
Contributor

Choose a reason for hiding this comment

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

Buraya bir yorum satırı ekleyelim; eğer nuget.org dışında bir paket sağlayıcı varsa buraya eklenmeli, eğer yok ise bu dosyaya ihtiyaç olmayabileceği tarzında.

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.

3 participants