Questions tagged [fluent]

Fluent interface is an API which allows method chaining to make code more readable.

Fluent interface is API which allows method chaining to make code more readable.

1148 questions
0
votes
1 answer

how to specify a composite key, in which one key is an identifier and another is not, using fluent nhibernate

I'm trying to specify a composite key, in which one key is an identifier and another is not, using fluent nhibernate. Is it possible in fluent? If yes, what I'm doing wrong in below mapping? public void Override(AutoMapping mapping) { …
0
votes
2 answers

Best way to make selects in laravel?

In order to use the Form::select, you need to add a name and two arrays. In a normal case, we have one with the id and another one with the name. Both needs to be loaded from a query. So in the model I have something like this: public static…
Anders Persson
  • 118
  • 3
  • 12
0
votes
1 answer

Laravel - update row with variable using fluent query builder

iam building my web app, and i need to the simplest thing, just update fields inside table with some variables,but its not working he doesnt do anything ,values of the fields remain just as it was. public function post_eupdate(){ $update =…
Silvio Marijic
  • 483
  • 4
  • 12
  • 22
0
votes
1 answer

Fluent NHibernate references and legacy database

I have an entity public class classA { public virtual classAId id {get;set;} } It has a compositeId public class classAId { public virtual int a {get;set;} public virtual int b {get;set;} } classB references classA public class classB { public…
cdbeelala89
  • 2,066
  • 3
  • 28
  • 39
0
votes
1 answer

fluent nhibernate calling oracle function

`i try to call an oracle function inside a package function : FUNCTION test_func (I_PARAMS IN TPARAMS, O_RESPONSE_CODE OUT VARCHAR2, O_RESPONSE_EXPLANATION OUT VARCHAR2) RETURN BOOLEAN IS …
0
votes
1 answer

Fluent NHibernate: Weird column mapping behaviour

I am having a number of problems trying to map entities using Fluent NHibernate. I have three entities, like this: public class Product { public virtual Guid Id { get; set; } public virtual Category Category { get; set; } public virtual…
cbp
  • 25,252
  • 29
  • 125
  • 205
0
votes
2 answers

Limit child entities without limiting parent entities - NHibernate

I'm trying to limit the result set of a mapped collection. Here is a simple model: public class Table1 { public virtual long Id { get; set; } public virtual IList Table2s { get; set; } } public class Table2 { public virtual…
Michael
  • 434
  • 1
  • 5
  • 12
0
votes
1 answer

Fluent NHibernate One to One Save

I have 3 classes: public class WorkEntity { public virtual int WorkId { get; set; } public virtual OrderExtensionEntity OrderExtension { get; set; } } public class OrderExtensionEntity { public virtual int Id { get; set; } public…
Daniel G
  • 433
  • 1
  • 7
  • 19
0
votes
2 answers

C# Fluent API for building Controls : Feedback Required

I've been working away (http://tinyurl.com/m4hzjb) on this Fluent API for instantiating ASP.NET controls and feel I now have something that appears to work well. I'm looking for some feedback and opinions... good, bad or indifferent. Would you find…
jlang
  • 157
  • 1
  • 1
  • 9
0
votes
1 answer

NHibernate Concurrency Windows Service ASP.NET MVC Website

I've got a Windows Service and a ASP.NET MVC 2 application that both connect to the same database using Fluent nHibernate (nHibernate 3). One of the entities (called Profile) has a string property that contains the url to an image. This property…
Sam Lad
  • 267
  • 5
  • 14
0
votes
1 answer

Fluent NHibernate Unidirectional relationships causing many updates

I have done some search on StackOverflow and google in general and I am still having trouble finding out why this is happening and how to fix it. I am new to NHibernate and FluentNHibernate, so please be gentle :) While doing some intergration…
Phillip
  • 229
  • 2
  • 14
0
votes
4 answers

Unexpected Result LINQ Where Clause

I have a method that limits the items in a list via LINQ. The list contains items with two boolean properties: bool_a and bool_b. The list contains items where bool_a is true and bool_b is false as well as items where both are false. My expectation…
goatshepard
  • 1,063
  • 1
  • 8
  • 18
0
votes
1 answer

many to many 2 way relationship with EF5

I have the following fluent configuration for a simple many to many relationship between user and roles. I need navigation properties both ways, and therefore have a collection of Users in Role, and vice versa. When I insert a new entity into User,…
Jim
  • 14,952
  • 15
  • 80
  • 167
0
votes
3 answers

Best way to implement fluent extension on the enum member

Lets say I got the extension which does something with the enum and then just returns it. public static T Do(this Enum e) where T : struct { // Do something. return // e? .. (T)e? .. or (T)(object)e? ; } So what should I return to let my…
AgentFire
  • 8,944
  • 8
  • 43
  • 90
0
votes
1 answer

Map multiple PK with Entity Framework

I have 2 classes at the moment. The first is an asset, the second is services associated with that asset. The Asset table in SQL Server has a PK over both ID and workflow_id. public class Asset { public int ID { get; set; } public int…
Alex.Ritna
  • 1,957
  • 2
  • 16
  • 24