示例#1
0
        internal async Task GetProjectsPreview_InValidEmptyAsync(Paging paging, ProjectSearch projectSearch)
        {
            using (var context = Storage.CreateContext())
            {
                try
                {
                    var api = Storage.CreatePublicController(context);


                    var response =
                        (
                            await api.GetProjectsPreviewAsync(paging, projectSearch) as JsonResult
                        ).Value as ExecutionResult <ProjectPreview[]>;
                    GenericChecks.CheckEmpty(response);
                }
                catch (Exception)
                {
                    throw;
                }
                finally
                {
                    context.FlushData();
                }
            }
        }