codefluent

How can I declare a Clustered key on a many-to-many relationship table in CodeFluent Entities with Sql Server Producer

假如想象 提交于 2020-01-17 04:42:24
问题 I have a CodeFluent Entities Model such as: <cf:project defaultNamespace="S5T" xmlns:cf="http://www.softfluent.com/codefluent/2005/1" xmlns:cfx="http://www.softfluent.com/codefluent/modeler/2008/1" xmlns:cfmy="http://www.softfluent.com/codefluent/producers.mysql/2012/1" xmlns:cfom="http://www.softfluent.com/codefluent/producers.model/2005/1" xmlns:cfasp="http://www.softfluent.com/codefluent/producers.aspnet/2011/1" xmlns:cfaz="http://www.softfluent.com/codefluent/producers.sqlazure/2011/1"

How to solve low performance issues with .NET MySql Connector on latest versions (6.9.8) when using CodeFluent Entities?

一个人想着一个人 提交于 2019-12-23 04:22:10
问题 I have a performance related database issue with CodeFluent Entities and MySql .NET connector. I'm using: CodeFluent Entities version 61214.820 MySql Connector 6.9.8 Compared to MySql .NET connector version 6.5.4 , .Save() method insert performance DROPPED from 230 records per second to 10 records per second on a dev test machine, same project, same routine, same MySql DB engine version, just by switching connector versions. Examining MySql query logs, I noticed there is a difference on the

Pivot Runner null command

不问归期 提交于 2019-12-20 04:13:49
问题 While updating existing schema with PivotRunner on an existing database, I'm facing the error presented below. I can't figure out why view may return an empty command. What are the most plausible cases ? If going over this error, I would have same error with a procedure, what should I check ? Thanks for your answer, {System.ArgumentNullException: Value cannot be null. Parameter name: command at CodeFluent.Runtime.Database.Management.SqlServer.PivotRunner.ExecuteNonQuery(String command,

Pivot Runner: force delete of existing constraint that match a constraint needed for the new model

廉价感情. 提交于 2019-12-12 06:45:18
问题 Facing same issue, is there any progress on this one : http://www.softfluent.com/product/codefluent-entities/knowledge-center/point-sql-server-producer-to-production-db-instead-of-using-pivot-producer Thanks for your answer, EDIT: this is the code used to delete all the constraints private static void RemoveCodeFluentConstraintsTable(IList<PivotRunnerConstraint> constraints, String connectionString) { using (SqlConnection con = new SqlConnection(connectionString)) { con.Open(); // Set up a

Why does CodeFluent keep database connections open by default?

六眼飞鱼酱① 提交于 2019-12-11 14:28:22
问题 CodeFluent keeps database connections open by default. What are the advantages of doing so? Are their any disadvantages when they are closed after use by using the setting closeConnectionOnCompleteCommand="true"? Regards Thomas 回答1: The CodeFluent Runtime handles database connection automatically, per thread. The main benefit is to not worry about managing connections, so you can do this with a "customer" generated class: Customer customer = new Customer(); customer.Name = "Joe" customer.Save

web.api only serializing hidden fields

断了今生、忘了曾经 提交于 2019-12-11 10:03:42
问题 I'm experiencing a strange behaviour. My web.api is returning only hiddenfields from my ObjectCollection on a GET request. This is my controller: // GET: api/UserDocuments [Route("api/UserDocuments/User/{userName}")] public List<DocIndex> Get(string userName) { User usuari = Humanisme.User.LoadByUserName(userName); List<DocIndex> resposta = DocumentCollection.LoadIndexPerUsuari(usuari); return resposta; } And this is the object as it gets generated from the BOM: namespace Humanisme { using

CodeFluent vs Interop.MSScriptControl.dll

本小妞迷上赌 提交于 2019-12-02 02:46:48
问题 We had a 32 bits service that we are trying to migrate to 64 bits. We were using Interop.MSScriptControl.dll to evaluate vb script written by users. Since there is no 64 bits version of the MSScriptControl . I created a process that was called inside the service. Each time that we need to evaluate users scripts, we call the process. After trying this solution, I found it really slow. I just discovered the CodeFluentRuntimeClient library that can evaluate vb script as well as JavaScript.

Can not save an entity with the value 0 for a non-nullable numeric property

自作多情 提交于 2019-11-28 02:24:10
My model contains an entity Order with a non-nullable property Amount of type decimal: cf:entity name="Order"> <cf:property name="Id" /> <cf:property name="Amount" typeName="decimal" defaultValue="0" nullable="false" /> </cf:entity> I can not save an instance of this entity with the value 0 for the property Amount, because when calling "Order.Save()" I get the error "Procedure or function 'Order_Save' expects parameter '@Amount', which was not supplied." from SQL-Server. Everything goes fine if I give the parameter the default value 0 in the stored procedure: ALTER PROCEDURE [dbo].[Order_Save]