Closed b1k-00 closed 6 months ago
[HttpPost("Add")]
[ProducesResponseType(StatusCodes.Status200OK, Type = typeof(bool))]
[ProducesResponseType(StatusCodes.Status404NotFound)]
public async Task
return await ((IApp<T>)_app).Create(entity);
}
[HttpPost("CreateMeeting")]
[ProducesResponseType(StatusCodes.Status200OK, Type = typeof(bool))]
[ProducesResponseType(StatusCodes.Status404NotFound)]
public async Task<bool> CreateMeeting(Meeting meeting)
{
return await _meetingApp.CreateMeeting(meeting);
}
builder.Services.AddHttpContextAccessor(); //This adds Amazon Cognito as the Identity Provider //builder.Services.AddCognitoIdentity();
builder.Services.AddDbContext
builder.Services.AddScoped<IUserApp, UserApp>();
builder.Services.AddScoped<IGenericRepository
namespace Application.Interfaces;
public interface IApp
Task<T> Get(int id);
Task<List<T>> GetAll();
Task<string> Update(T entity);
Task<string> Delete(int id);
Task<T> Create(T newEntity);
}
Interfaces Igloo
Define interfaces that BTM app will implement. -For Each domain create CRUD interface, this sets up our repository pattern better -review commit e1808827 to understand implementation -hold off on the IApp implementation