xaf

How do I include a [NotMapped] property in an EF business object without getting FirstChance IndexOutofRangeException?

无人久伴 提交于 2021-01-29 06:32:25
问题 I was wondering why my XAF WinForms EF application was slow loading a detail view. Then I learned how to capture FirstChance Exceptions and discovered I was experiencing an IndexOutOfRange exception as described here Sometimes I want to include a non mapped property in my business object such as Job in example. public class OrderLineResult { public int LineId { get; set; } public int Quantity { get; set; } public string Description { get; set; } [Browsable(false)] public int JobId { get; set;

Unable to create an object of type 'MyEFCoreDbContext' xaf Blazor EFCore

不问归期 提交于 2020-12-12 11:47:13
问题 I created a new project with the XAF Blazor 20.2.3 wizard and upgraded the EFCore packages to 5.0. In PM I ran Install-Package Microsoft.EntityFrameworkCore.Tools However when I run add-migration initial I get Unable to create an object of type 'ExamBuddyEFCoreDbContext'. For the different patterns supported at design time, see https://go.microsoft.com/fwlink/?linkid=851728 I have looked at the link but I don't think it applies to the xaf Blazor app. I tried commenting out the Database

No connection string named 'ConnectionString' could be found in the application config file (EF parameterless constructor )

∥☆過路亽.° 提交于 2020-06-17 00:50:53
问题 When I create a new Dev Express XAF application using the wizard 20.1.3 for .netcore3.1 the code works fine. I can enable migrations and run a migration without problems. (Or so I thought ... see below) However for certain reasons (my legacy call run-migrations code) I want to provide the connection string location to the constructor When I do this, and try to add a migratiion I get an error The DbContext is set up as using System; using System.Data.Entity; using System.Data.Common; using

No connection string named 'ConnectionString' could be found in the application config file (EF parameterless constructor )

天涯浪子 提交于 2020-06-17 00:49:31
问题 When I create a new Dev Express XAF application using the wizard 20.1.3 for .netcore3.1 the code works fine. I can enable migrations and run a migration without problems. (Or so I thought ... see below) However for certain reasons (my legacy call run-migrations code) I want to provide the connection string location to the constructor When I do this, and try to add a migratiion I get an error The DbContext is set up as using System; using System.Data.Entity; using System.Data.Common; using

System.Configuration.ConfigurationManager.ConnectionStrings retrieves old value at runtime

梦想的初衷 提交于 2020-05-30 11:41:19
问题 In my dotnetcore winforms application I am able to get the connection string correctly from app.config when running in the IDE var connectionString = System.Configuration.ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString; For run time, I thought I would just replace the connection string in the MyApp.Win.config file. However the connection string is being pulled from MyApp.Win.dll.config The docs are here. 来源: https://stackoverflow.com/questions/61845150/system

Devexpress xaf ungroup layout of inherited class. (programmaticaly)

淺唱寂寞╮ 提交于 2019-12-23 02:22:24
问题 I am using devexpress xaf to create a multi platform app. I have class 'commonFields' which contains common fields "creation_date, created_by" etc. all other classes inherit from this class. My problem is that, in detailView layout, common fields are displayed in a group labled commonFields. I know it can be solved using the model editor where I can simply right click over the group and choose ungroup, but if I have lets say more than 50 tables I will have to edit all the layouts individually

Why can't I see a localdb database created by a UWP (Desktop Bridge App) in the SQL Server Object Explorer?

邮差的信 提交于 2019-12-19 19:52:41
问题 Does UWP support LocalDB? My investigations indicate there are some issues using localdb that I don't experience with SQL Server 2017 Development edition. I managed to convert a winforms EF-Code First, xaf application to run as a UWP app with the help of this blog I have Enterprise Authentication set. When I run the desktop bridge app it creates the database and log file inside c:\users\kirst which is my user folder. However I cannot see the new database in the SQL Server Object Explorer

Design and Modelling for DexExpress eXpressApp Framework

天涯浪子 提交于 2019-12-12 04:59:55
问题 The DevExpress XAF does much basis work for you, it creates a database based on your business objects, and dynamically generates a UI based on these, with basic functions like add, delete, sort etc. already present. This leaves me wondering how to go about properly designing and modelling an application built on this framework. I could only model my business objects, or I could identify functions provided by the framework and include them in a details model down to sequence diagram level, but

EntityFramework.SqlServer missing in release mode

余生长醉 提交于 2019-12-12 01:24:21
问题 I have several modules in my XAF Winforms application. The lowest tier makes use of Entity Framework 6.2 as installed by Nuget. The app runs fine in debug mode. However in release mode I get the following warning building. Severity Code Description Project File Line Suppression State Warning Could not resolve this reference. Could not locate the assembly "EntityFramework.SqlServer". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get

Nuget command to replace existing references with nuget references?

走远了吗. 提交于 2019-12-11 06:06:49
问题 In VS2017 I created a new Winforms project using the XAF Solutions Wizard ( Entity Framework Code - First) The wizard adds references according to options I select. Now I want to change all the packages to use my Nuget Feed for the Dev Express References. XAF does have Nuget packages Is there a Nuget command that I can use to do this automatically? Cross posted to Dev Express 回答1: There is no way to do this with Nugets unless you script your way out as we are doing in XAF community project