Click here to Skip to main content
15,887,676 members
Home / Discussions / Design and Architecture
   

Design and Architecture

 
GeneralRe: Send Purchase Order and Verify Email Pin
Richard Deeming15-May-19 0:38
mveRichard Deeming15-May-19 0:38 
AnswerRe: Send Purchase Order and Verify Email Pin
phil.o14-May-19 5:12
professionalphil.o14-May-19 5:12 
GeneralRe: Send Purchase Order and Verify Email Pin
Richard Deeming14-May-19 7:35
mveRichard Deeming14-May-19 7:35 
GeneralRe: Send Purchase Order and Verify Email Pin
phil.o14-May-19 8:30
professionalphil.o14-May-19 8:30 
GeneralRe: Send Purchase Order and Verify Email Pin
Kevin Marois14-May-19 9:06
professionalKevin Marois14-May-19 9:06 
GeneralRe: Send Purchase Order and Verify Email Pin
jschell18-May-19 6:59
jschell18-May-19 6:59 
GeneralRe: Send Purchase Order and Verify Email Pin
phil.o18-May-19 7:19
professionalphil.o18-May-19 7:19 
Questionn-Tier Architecture and Async Pin
Kevin Marois10-May-19 6:07
professionalKevin Marois10-May-19 6:07 
I have a WPF app that hits a SQL server on the network. Pretty simple. At some point I'm going to be adding both tablet and web components, so I need to introduce a WebAPI. I will probably use an Asp.Net MVC WebAPI.

Here's the question...

Right now my UI calls the BL, which in turn calls the DAL. That will then become:
Client => Controller => BL => DAL

The BL methods will then need to be async, correct?

EmployeeController
[HttpGet]
public async Task<List<EmployeeEntity>> GetAllEmployees()
{
    return await GetBL().GetAllEmployees();
}
and
BL
private async List<EmployeeEntity> GetAllEmployees()
{
    var t = await Task.Factory.StartNew(() =>
    {
        return _dal.GetAllEmployees();
    });

    return t;
}

This works and it's pretty simple, but is this the right approach for async? I'm open to suggestion.
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.


modified 10-May-19 12:16pm.

AnswerRe: n-Tier Architecture and Async Pin
Richard Deeming10-May-19 6:46
mveRichard Deeming10-May-19 6:46 
GeneralRe: n-Tier Architecture and Async Pin
Kevin Marois10-May-19 7:18
professionalKevin Marois10-May-19 7:18 
GeneralRe: n-Tier Architecture and Async Pin
Richard Deeming10-May-19 9:02
mveRichard Deeming10-May-19 9:02 
GeneralRe: n-Tier Architecture and Async Pin
Kevin Marois10-May-19 9:10
professionalKevin Marois10-May-19 9:10 
GeneralRe: n-Tier Architecture and Async Pin
Richard Deeming10-May-19 9:50
mveRichard Deeming10-May-19 9:50 
GeneralRe: n-Tier Architecture and Async Pin
Kevin Marois10-May-19 10:08
professionalKevin Marois10-May-19 10:08 
GeneralRe: n-Tier Architecture and Async Pin
Richard Deeming10-May-19 11:05
mveRichard Deeming10-May-19 11:05 
GeneralRe: n-Tier Architecture and Async Pin
Nathan Minier10-May-19 7:32
professionalNathan Minier10-May-19 7:32 
GeneralRe: n-Tier Architecture and Async Pin
Kevin Marois10-May-19 7:36
professionalKevin Marois10-May-19 7:36 
QuestionLookup Editor Design Question Pin
Kevin Marois27-Apr-19 7:28
professionalKevin Marois27-Apr-19 7:28 
AnswerRe: Lookup Editor Design Question Pin
Mycroft Holmes27-Apr-19 13:29
professionalMycroft Holmes27-Apr-19 13:29 
GeneralRe: Lookup Editor Design Question Pin
Kevin Marois27-Apr-19 13:44
professionalKevin Marois27-Apr-19 13:44 
GeneralRe: Lookup Editor Design Question Pin
Mycroft Holmes27-Apr-19 13:49
professionalMycroft Holmes27-Apr-19 13:49 
GeneralRe: Lookup Editor Design Question Pin
Kevin Marois27-Apr-19 13:57
professionalKevin Marois27-Apr-19 13:57 
GeneralRe: Lookup Editor Design Question Pin
Eddy Vluggen28-Apr-19 1:09
professionalEddy Vluggen28-Apr-19 1:09 
QuestionJ2EE or the other stuff. Pin
abmv22-Apr-19 7:35
professionalabmv22-Apr-19 7:35 
AnswerRe: J2EE or the other stuff. Pin
Eddy Vluggen22-Apr-19 8:00
professionalEddy Vluggen22-Apr-19 8:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.