Example #1
0
        public async Task <IActionResult> Index()
        {
            var model = await client.ApiCompanyUserGetAsync();

            // TODO: Benutze den Automapper!
            var viewmodel = new List <EmployeeViewModel>();

            foreach (var item in model)
            {
                viewmodel.Add(new EmployeeViewModel {
                    Id          = item.Id,
                    Name        = item.N,
                    PhoneNumber = item.Pn
                });
            }
            return(View(viewmodel));
        }
Example #2
0
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 public static IList <EmployeeDto> ApiCompanyUserGet(this IWorkshopAPI operations)
 {
     return(operations.ApiCompanyUserGetAsync().GetAwaiter().GetResult());
 }