aspnetboilerplate

How to create View (SQL) from Entity Framework in ABP Framework

笑着哭i 提交于 2019-12-24 18:13:05
问题 My situation is that I need to query from another database and show the result in my application. Both databases are on the same server. I came up with an idea on creating SQL-View in my database which would query the other database for values that I want. But I am not quite sure on how I can create or map SQL-View from the ABP framework? I am using the full .Net framework with the Angular template. 回答1: Creating View is not directly supported in EF. So you can try the below approach. Create

MapTo() inside of LINQ returning multiple iterations of same data

蓝咒 提交于 2019-12-24 17:24:49
问题 I am using .NET Core with the ASP.NET Boilerplate framework. In some code that I was given to fix, we had a GetAll() method that was supposed to return a collection of rows from the MsSql database. The original code: public IEnumerable<GuidelineCategoriesDto> GetAll(bool activeFilter = true) { return _guidelineCategoriesRepo.GetAll().Select(x => x.MapTo(new GuidelineCategoriesDto())).ToList(); } The problem I was running into with this method, is that it would return the latest row that had

How to create user defined functions using code first in ABP?

我的未来我决定 提交于 2019-12-24 11:29:49
问题 I want to create some user-defined functions using code first approach in abp framework. I have created stored procedures xyz by adding xyz.sql inside EntityFrameworkCore\Migrations\Stored Procedures folder, But not able to find a way to create a function, please help. 来源: https://stackoverflow.com/questions/48262776/how-to-create-user-defined-functions-using-code-first-in-abp

ASP.NET Boilerplate Domain Layer appears to contain non-Domain classes

妖精的绣舞 提交于 2019-12-24 07:15:25
问题 I have recently done some analysis of ASP.Net Boilerplate (https://aspnetboilerplate.com). I have noticed that the domain layer (MyProject.Core) has folders for the following (these are created by default): Authorization Confirguration Editions Features Identity Localization MultiTenancy etc Why would you put all of this in the Domain Layer of an application? From what I can see; I believe most of this code should be found in the Application Layer (which could also be the service layer). 回答1:

How to use ASPNET BoilerPlate with Oracle Database

断了今生、忘了曾经 提交于 2019-12-24 03:59:27
问题 We are using .Net Core template of ASPNET BoilerPlate framework. It works fine with SQL Server, but now we need to use Oracle 11g instead. Is it possible? If yes, how can we implement it for our project? Thanks and sorry for my English. 来源: https://stackoverflow.com/questions/54840503/how-to-use-aspnet-boilerplate-with-oracle-database

Multiple projects for Application Services in ASP.NET Boilerplate

故事扮演 提交于 2019-12-24 00:23:48
问题 I have an application with two projects that contain IApplicationService classes, but the framework only resolves client proxies (in JavaScript: abp.services.app.xxxx ) by default for Application project that comes with base template. myProject.Application => default ASP.NET Boilerplate myProject.ExtraServices => my own (not generating client proxies) Thanks. 回答1: ASP.NET Core Create controllers for your ExtraServices project in MyProjectWebCoreModule: Configuration.Modules.AbpAspNetCore()

Database per tenant - a step by step example to confirm my thinking

旧时模样 提交于 2019-12-23 04:47:34
问题 I just need confirmation I'm on the right track with this aspect I'm trying to implement. Step 1 : for each tenant create a new context eg public class TenantOneContext : AbpZeroDbContext<Tenant, Role, User, TenantOneContext{ public DbSet<MyModel1> MyModel1S { get; set; } public DbSet<MyModel1> MyModel2S { get; set; } Step 2 : I assume using a naming convention, that each context that exists, there is an associated [contextname]Configurer eg public static class TenantOneContextConfigurer {

Custom API response HTTP status codes with ABP Framework

最后都变了- 提交于 2019-12-22 09:50:03
问题 Is there any way to return custom HTTP Status Codes (like 4xx) with ASP.NET Boilerplate? I would like to set custom application specific HTTP codes in context of validation to add more granularity. Currently ABP would set 200(OK) for all validation errors. In ABP source code is see few places like one below where Response.StatusCode is set by the framework like here : private void HandleAndWrapException(ExceptionContext context) { if (!ActionResultHelper.IsObjectResult(context

How does the JavaScript Create-Update-Delete actually work?

雨燕双飞 提交于 2019-12-20 07:17:14
问题 Using MVC Template with jQuery ASP.Net Core 2.0 Taking the code below as an example, I'm unclear as to actually what or how this call is constructed and what path it takes (API or direct ref to app services). snipped... I do understand that the fetches from the Controllers are via the Application Services directly (not API calls) using the template in it's default state. It's just the create/update/delete calls via the JavaScript that has me a slightly confused. 回答1: It is an API call. How it

Should I be calling an AppService from another AppService?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-20 03:14:36
问题 Context Currently I'm working in a Documents and Records Management System (DRMS?). Because of some technical limitations I need to store a "view" file and a "source" file (DOCX or XLSX). A view file is a PDF file for users to print, download and view for every day usage while a source file is the editable file. When users require to update a file, they will download the source, update it, and upload a new view file and the corresponding source file. I'm not able, at this time, to implement