Tantrim
Tantrim
CC#
Created by Tantrim on 7/29/2024 in #help
Solution Architecture Question
I'm going to create a new solution but I want to make sure I have a good/best practices architecture. One of my main focus's for this solution is to learn about these technologies so I'm not overly concerned with using other technologies even if those might be best practice. technologies I want to use: 1. Blazor - "Blazor Web App" template 2. Entity Framework 3. SQLite The app will be calling a 3rd party API to retrieve data (no POST) and save that to a local DB. I want to then manipulate the data and have different dashboards on that data. It's nothing complex, I just want to start down the correct path. So I guess my main question is, what projects should I be using to build this small app.
14 replies
CC#
Created by Tantrim on 6/29/2024 in #help
INotifyPropertyChanged
No description
26 replies
CC#
Created by Tantrim on 4/18/2023 in #help
❔ Unable to resolve service type for IHttpClientFactory
I'm hitting a wall on what to do. I have two .NET 7.0 applications. One of which an API and the other a Web App. Both apps are using the same version of System.Net.Http and builder.Services.AddHttpClient() doesn't seem to do anything. This is my first project working with API's like this so I'm a little lost on what to do. I'm willing to screen share if someone wants to hop in voice.
// API Project
// Program.cs
var builder = WebApplication.CreateBuilder(args);

// Add services to the container
builder.Services.AddControllers();
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddHttpClient();

builder.Services.AddLogging();
builder.Services.AddSwaggerGen();

var app = builder.Build();

// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{
app.UseSwagger();
app.UseSwaggerUI();
}

app.UseHttpsRedirection();
app.UseAuthorization();

app.MapControllers();
app.Run();
// API Project
// Program.cs
var builder = WebApplication.CreateBuilder(args);

// Add services to the container
builder.Services.AddControllers();
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddHttpClient();

builder.Services.AddLogging();
builder.Services.AddSwaggerGen();

var app = builder.Build();

// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{
app.UseSwagger();
app.UseSwaggerUI();
}

app.UseHttpsRedirection();
app.UseAuthorization();

app.MapControllers();
app.Run();
5 replies