Comments (7)
All the deep. There are some ways of configuring this, but honestly: in most cases it is more pragmatic just to:
new { obj.Foo, obj.Bar, obj.Blap }
to explicitly call out the things you want.
This is an interesting scenario, though. I wonder whether we could do something over in AOT-land to specify better restriction rules (in the AOT work, we have much better analysis tooling, and better ways of specifying configuration)
from dapper.
I'm going to refer to the Apache license to answer that:
Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
If it works, great! I feel comfortable using it, as long as I have integration tests working.
from dapper.
Can we see how you're invoking the SQL? Including (and in particular) the parameters? I can't do much without seeing the usage.
from dapper.
I wonder, in particular, whether you somehow have a @uniqueId
and @UniqueId
(or similar), leading to this.
from dapper.
In this example, Model
is what defined the parameters. So: can we see the type that describes Model
? In particular, anything even remotely relating to unique id - regardless of kind (property, field, etc) or accessibility (public, private, etc)
from dapper.
Sorry I accidentally deleted previous comment.
Basically
using IDbConnection connection = new ConnectionFactory().CreateSQL();
if (connection != null)
{
connection.Open();
var result = connection.ExecuteScalar(UPDATE_QUERY, Model);
Model is the class with UniqueID field
Checking the Model class maybe I found the problem: my partial class has this signature
public partial class pro_ordine_composizione : GanttTask, INotifyPropertyChanged
in the Telerik.Windows.Controls.GanttView.GanttTask there is another uniqueid property.
So, I've my base class
public partial class pro_ordine_composizione
{
private string? _UniqueID;
public string? UniqueID { get => _UniqueID; set { if (_UniqueID != value) { _UniqueID = value; OnPropertyChanged();} } }
my partial (with non relevant things)
public partial class pro_ordine_composizione : GanttTask, INotifyPropertyChanged
and finally the GanttTask
[Serializable]
public class GanttTask : PropertyChangedBase, IGanttTask, IDateRange, IResourceContainer, IHierarchical, IStateProvider, IMilestone, ISummary, IEditableHierarchical, IDependant
{
private ObservableCollection<IResource> resources;
private DateTime start;
private DateTime end;
private string title = string.Empty;
private string description = string.Empty;
private double progress;
private DateTime? deadLine;
private bool isExpired;
private bool isExpiredUpdate = true;
private bool isMilestone;
private string uniqueId;
Maybe is this the problem ? But Dapper how deep goes to add parameters ?
from dapper.
I've already tested AOT with a part of our software (with good results), when do you think it might be "safe" to switch prod environment to AOT ?
from dapper.
Related Issues (20)
- You can see more details here
- Unable to reuse TempTable created when also sending params into the execute HOT 2
- Multiple enumerations of IEnumerable<SqlDataRecord> passed as TVP HOT 5
- The byte data type is not supported by the IN clause
- [Feature Request] Using InterpolatedStringHandler for templated command, becuase its pretty
- "No mapping exists" error when using a TypeHandler and a collection parameter
- Problem with DateOnly mapping when updating form v2.1.35 to 2.1.44 HOT 5
- DateOnly "off by one" column error HOT 9
- Potential buffer over-read (yielding exception) in Npgsql code when reading arrays with ArrayNullabilityMode.PerInstance HOT 2
- SQLite TypeHandler not called HOT 3
- What's the status of version 2.1.42 and version 2.1.44? HOT 2
- Unable to find Dapper.dll in linux machine. HOT 9
- Silent Exception in QueryFirstOrDefaultAsync<T> / QueryFirstOrDefault (MS SQL) HOT 4
- Add query execution listeners HOT 1
- Dapper Package - Failed to resolve assembly: 'System.Data.Common, Version=0.0.0.0, Culture=neutral, ...' HOT 8
- Pass C# array to UDTF in Snowflake as an array
- Feature Request: Type-safe Mapping
- Db2 Test Cases
- Dapper use sql + parameter efficient HOT 1
- Option SqlMapper.Settings.ApplyNullValues is not respected
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dapper.