Search Results

Search found 13331 results on 534 pages for 'fluent interface'.

Page 2/534 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Class Map Generator for Fluent NHibernate

    - by Farzad
    Is there a Class Map generator for Fluent NHibernate? I need something like db2hbm but I want it to generate Fluent Class Maps instead of xml mappings. I am aware of AutoMapping for Fluent but that is not what I want. I want to be able to generate Class Map files from tables in database and push them to my src repository.

    Read the article

  • fluent api complex example

    - by intern
    we have tried some of simple Fluent API examples. to brush up our skills we want to move ahead to complex examples. but we do not what to make as a complex fluent api. can anyone suggest what should we make or where can we get the idea about it? we have recently started writing fluent api codes in Ruby and have tested very basic ones. Now we want to move to complex ones to get better idea about it.

    Read the article

  • How is this "interface"-like structure/pattern called?

    - by Sebastian Negraszus
    Let's assume we have an XmlDoc class that contains basic functionality for dealing with an XML data structure and saving/loading data to/from a file. Now we have several subclasses, A, B and C. They all inherit from XmlDoc and add component-specific methods for setting and getting lots of data. They are like "interfaces" but also add an implementation for the signatures. Finally, we have an ABCDoc class that joins all the "interfaces" via virtual multiple inheritence and adds some ABCDoc-specific stuff, such as using XMLDoc-methods to set an appropriate doc type. We may also have an ADoc class for only saving A data. How is this pattern called? "Interface" is not really the right word since interfaces usually do not contain an implementation. Bonus points for C++ code conventions.

    Read the article

  • Designing software interface for various screen sizes

    - by Tower
    Hi, Nowadays we have screens like 1920x1200 and 1680x1050 in popular use and some even use 2560x1600 resolution while some older systems still rely on a 800x600 resolution. I am writing a software that looks good on a 1680x1050, but too small on a 1920x1200 and too large on a 1024x768. Do you have suggestions how to go for designing an application for various screen sizes? Things were a lot simpler before when we had little differences in resolutions, but now it seems there's no good way of handling this. I know this question is more about designing / layout than programming, but I bet this is more or less part of programmers life so I made this post here.

    Read the article

  • Looking for a simple web interface with subversion support and ticket /issue tracker [closed]

    - by Stefan Andre Brannfjell
    I am working on a small project and we have a few programmers on the job. We are using subversion to commit updates and keep all developers up to date on their workstations. However, we have yet to find a suitable web interface to use for it. I have tried redmine, but that installation progress was extremely bothersome and advanced. Once I got it to work I found out that it was slow and did not meet my expectations. As well as it seems a bit complex for our needs. I would prefer to find a solution that supports lighttpd web server, however that seem to be very hard to come by, those I have found seem to only have apache support. Functionality i wish for the website: - login to an svn account - view svn logs - view & create issues, todo list etc - view svn difference Do you have any open source recommendations that I can try out? I will appreciate any kind of reply. :) Edit: I wish to host the website on our own servers.

    Read the article

  • Changing the interface language in Windows 7 Home Premium

    - by Cristián Romo
    A friend of mine has recently purchased a laptop in the U.S. that has Windows 7 Home Premium on it with an English interface. Not being a native English speaker, I'm trying to change the interface language to traditional Chinese. I've looked through the Control Panel in search of something that might let me change the interface language. Naturally, I looked at the Region and Language section and managed to change the formats the computer uses and install a working keyboard, but I haven't found a way to change the interface language. Upon doing some research, I found out that there are two kinds of interface packs, Multilingual User Interface (MUI) and Language Interface Packs (LIP). It seems that MUIs can only be installed through Windows Update, so I looked through the list of updates. To my dismay, the language packs are not present. The optional updates tab doesn't even show up. Many sites show a drop down menu the under Keyboards and Languages tab in the Region and Language options, yet it doesn't show up for me. We also don't have the Windows 7 DVD which might contain this useful file. As far as the LIPs go, I can't find one in Chinese at all, let alone traditional Chinese. Can the interface language be changed in Home Premium at all? If it can, how would I do so?

    Read the article

  • Interface is too empty

    - by Nade Ali
    I have recently installed Ubuntu 12.04 0n my PC without any third-party software (cause i havent been able to get my dial-up to work). When i open Ubuntu after reboot, there is absolutely nothing on the desktop screen except for an 'Untitled' folder at the corner of the screen. There is no menu, no taskbars at the top whatever. I dont know why this is happening. The .iso from which i have booted amd installed Ubuntu is fine. I have already conducted an md5sum test and it was all fine. Looking forward to your response.

    Read the article

  • Using Fluent NHibernate in commercial application

    - by Paja
    I want to use Fluent NHibernate in commercial desktop application, and I'm little concerned about the licensing. I've downloaded Fluent NHibernate precompiled binaries, and it contains this list of files: Antlr3.Runtime.dll Castle.Core.dll Castle.DynamicProxy2.dll FluentNHibernate.dll Iesi.Collections.dll log4net.dll NHibernate.dll NHibernate.ByteCode.Castle.dll I guess I will have to add all of these files to my Inno Setup script, which will install them on user's computer. But what should I do to comply to all of the licenses associated with each file? I'm sure I'm not the first who wants to use Fluent NHibernate in commercial application, so I hope I won't have to study each of the licenses. I'm not a lawyer.

    Read the article

  • How does Fluent NHibernate support the Import Entity

    - by Bender
    I want to create a strongly type object from a fluent NHibernate query. If I were using HQL and NHibernate I belive I would need: the class for the output Namespace Model Public Class namecount Public Overridable Property lastname() as string ... Public Overridable Property lastnamecount() as integer ... Public Sub New(lastname as string, count as integer) ... End Class End Namespace an .hbm.xml file <?xml ...> <hibernate-mapping ...> <import class="model.namecount,model"> </hibernate-mapping> and of course the query _session.createquery("select new namecount(lastname, count(lastname)) ...") (The above is a paraphrased example taken from one of the 2008 SummerofNHibernate videos) I cannot find any examples of how to do this with fluent (even in C#), is it possible? If it isn't is there a VB example of how to mix Fluent and .hbm.xml

    Read the article

  • .NET: Interface Problem VB.net Getter Only Interface

    - by snmcdonald
    Why does an interface override a class definition and violate class encapsulation? I have included two samples below, one in C# and one in VB.net? VB.net Module Module1 Sub Main() Dim testInterface As ITest = New TestMe Console.WriteLine(testInterface.Testable) ''// Prints False testInterface.Testable = True ''// Access to Private!!! Console.WriteLine(testInterface.Testable) ''// Prints True Dim testClass As TestMe = New TestMe Console.WriteLine(testClass.Testable) ''// Prints False ''//testClass.Testable = True ''// Compile Error Console.WriteLine(testClass.Testable) ''// Prints False End Sub End Module Public Class TestMe : Implements ITest Private m_testable As Boolean = False Public Property Testable As Boolean Implements ITest.Testable Get Return m_testable End Get Private Set(ByVal value As Boolean) m_testable = value End Set End Property End Class Interface ITest Property Testable As Boolean End Interface C# using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace InterfaceCSTest { class Program { static void Main(string[] args) { ITest testInterface = new TestMe(); Console.WriteLine(testInterface.Testable); testInterface.Testable = true; Console.WriteLine(testInterface.Testable); TestMe testClass = new TestMe(); Console.WriteLine(testClass.Testable); //testClass.Testable = true; Console.WriteLine(testClass.Testable); } } class TestMe : ITest { private bool m_testable = false; public bool Testable { get { return m_testable; } private set { m_testable = value; } } } interface ITest { bool Testable { get; set; } } } More Specifically How do I implement a interface in VB.net that will allow for a private setter. For example in C# I can declare: class TestMe : ITest { private bool m_testable = false; public bool Testable { get { return m_testable; } private set //No Compile Error here! { m_testable = value; } } } interface ITest { bool Testable { get; } } However, if I declare an interface property as readonly in VB.net I cannot create a setter. If I create a VB.net interface as just a plain old property then interface declarations will violate my encapsulation. Public Class TestMe : Implements ITest Private m_testable As Boolean = False Public ReadOnly Property Testable As Boolean Implements ITest.Testable Get Return m_testable End Get Private Set(ByVal value As Boolean) ''//Compile Error m_testable = value End Set End Property End Class Interface ITest ReadOnly Property Testable As Boolean End Interface So my question is, how do I define a getter only Interface in VB.net with proper encapsulation? I figured the first example would have been the best method. However, it appears as if interface definitions overrule class definitions. So I tried to create a getter only (Readonly) property like in C# but it does not work for VB.net. Maybe this is just a limitation of the language?

    Read the article

  • Legacy Database, Fluent NHibernate, and Testing my mappings

    - by sdanna
    As the post title implies, I have a legacy database (not sure if that matters), I'm using Fluent NHibernate and I'm attempting to test my mappings using the Fluent NHibernate PersistenceSpecification class. My question is really a process one, I want to test these when I build locally in Visual Studio using the built in Unit Testing framework for now. Obviously this implies (I think) that I'm going to need a database. What are some options for getting this into the build? If I use an in memory database does NHibernate or Fluent NHibernate have some some mechanism for sucking the database schema from a target database or maybe the in memory database can do this? Will I need to manually get the schema to feed to an in memory database? Ideally I would like to get this this setup to where the other developers don't really have to think about it other than when they break the build because the tests don't pass.

    Read the article

  • How to use Fluent style syntactic sugar with c# property declaration

    - by Thomas
    i never use fluent style code before. so first time i tried to develop Fluent style with c# property declaration but getting error. can any one help me. public class MailTemplate { string _MailBody = ""; public MailTemplate MailBody { get { return _MailBody; } set { _MailBody = value ; } } string _Subject = ""; public MailTemplate Subject { get { return _Subject; } set { _Subject = value; } } string _MailFrom = ""; public MailTemplate MailFrom { get { return _MailFrom; } set { _MailFrom = value; } } } please help me how could assign or initialize mail body and later also can read with same property name. i think proeprty can not be use in case of fluent style development. need some light here. thanks

    Read the article

  • Getting Started with Fluent NHibernate

    - by Andy
    I'm trying to get into using Fluent NHibernate, and I have a couple questions. I'm finding the documentation to be lacking. I understand that Fluent NHibernate / NHibernate allows you to auto-generate a database schema. Do people usually only do this for Test/Dev databases? Or is that OK to do for a production database? If it's ok for production, how do you make sure that you're not blowing away production data every time you run your app? Once the database schema is already created, and you have production data, when new tables/columns/etc. need to be added to the Test and/or Production database, do people allow NHibernate to do this, or should this be done manually? Is there any REALLY GOOD documentation on Fluent NHibernate? (Please don't point me to the wiki because in following along with the "Your first project" code building it myself, I was getting run-time errors because they forget to tell you to add a reference. Not cool.) Thanks, Andy

    Read the article

  • Problem with interface implementation in partial classes.

    - by Bas
    I have a question regarding a problem with L2S, Autogenerated DataContext and the use of Partial Classes. I have abstracted my datacontext and for every table I use, I'm implementing a class with an interface. In the code below you can see I have the Interface and two partial classes. The first class is just there to make sure the class in the auto-generated datacontext inherets Interface. The other autogenerated class makes sure the method from Interface is implemented. namespace PartialProject.objects { public interface Interface { Interface Instance { get; } } //To make sure the autogenerated code inherits Interface public partial class Class : Interface { } //This is autogenerated public partial class Class { public Class Instance { get { return this.Instance; } } } } Now my problem is that the method implemented in the autogenerated class gives the following error: - Property 'Instance' cannot implement property from interface 'PartialProject.objects.Interface'. Type should be 'PartialProjects.objects.Interface'. <- Any idea how this error can be resolved? Keep in mind that I can't edit anything in the autogenerated code. Thanks in advance!

    Read the article

  • Would this be viewed poorly amongst the programming community?

    - by Eric P
    So one of my responsibilities at work is to build an internal tool that helps the workers enter in all their information. It's an enterprise application that is similar to a Windows forms database tool. So it's not much different than like developing a Word + Excel combo application, but the average person in this workgroup is a 20-40 year old woman or a random chatty male type. Plus I know all of these people are heavily involved with Facebook on a daily basis. How bad would it be if I styled my new interface to be similar to what Facebook does. People could get award points and stuff when they fill out different types of forms and basically compete against each other like it was a game. When people had completed one, it would be posted on their wall and everyone could comment/like stuff just like in Facebook. And it would be like they are doing peer reviewing for fun. The rewards would be outstanding I would imagine. These people are so into Facebook and Facebook games that productivity would rise due to them trying to compete and earn points and achievements. Would this be taking advantage of the people by 'tricking them into working harder by giving them a game' or would it be viewed as something that would improve happiness at work?

    Read the article

  • Would adding award points or game features to workplace software be viewed poorly amongst the programming community?

    - by Eric P
    So one of my responsibilities at work is to build an internal tool that helps the workers enter in all their information. It's an enterprise application that is similar to a Windows forms database tool. So it's not much different than like developing a Word + Excel combo application, but the average person in this workgroup is a 20-40 year old woman or a random chatty male type. Plus I know all of these people are heavily involved with Facebook on a daily basis. How bad would it be if I styled my new interface to be similar to what Facebook does. People could get award points and stuff when they fill out different types of forms and basically compete against each other like it was a game. When people had completed one, it would be posted on their wall and everyone could comment/like stuff just like in Facebook. And it would be like they are doing peer reviewing for fun. The rewards would be outstanding I would imagine. These people are so into Facebook and Facebook games that productivity would rise due to them trying to compete and earn points and achievements. Would this be taking advantage of the people by 'tricking them into working harder by giving them a game' or would it be viewed as something that would improve happiness at work?

    Read the article

  • C# : When to go Fluent

    - by ach
    In many respects I really like the idea of Fluent interfaces, but with all of the modern features of C# (initializers, lambdas, named parameters) I find myself thinking, "is it worth it?", and "Is this the right pattern to use?". Could anyone give me, if not an accepted practice, at least their own experience or decision matrix for when to use the Fluent pattern? Conclusion: Some good rules of thumb from the answers so far: Fluent interfaces help greatly when you have more actions than setters, since calls benefit more from the context pass-through. Fluent interfaces should be thought of as a layer over top of an api, not the sole means of use. The modern features such as lambdas, initializers, and named parameters, can work hand-in-hand to make a fluent interface even more friendly. ... Edit: Here is an example of what I mean by the modern features making it feel less needed. Take for example a (perhaps poor example) Fluent interface that allows me to create an Employee like: Employees.CreateNew().WithFirstName("Peter") .WihtLastName("Gibbons") .WithManager() .WithFirstName("Bill") .WithLastName("Lumbergh") .WithTitle("Manager") .WithDepartment("Y2K"); Could easily be written with initiallizers like: Employees.Add(new Employee() { FirstName = "Peter", LastName = "Gibbons", Manager = new Employee() { FirstName = "Bill", LastName = "Lumbergh", Title = "Manager", Department = "Y2K" } }); I could also have used named parameters in a constructors in this example.

    Read the article

  • Fluent: Table name different from entity name

    - by Matt
    I am trying to use the automapping feature of Fluent with nHinbernate to map a class with a different name than the table itself is name. (This is purely for stylistic reasons we have a class named Foo which contains an object named Bar but the table name is FooBar. We would rather not have a property Foo.FooBar.) I can't find anything detailing how to give Fluent a clue on this change.

    Read the article

  • Using a nHibernate wrapper with fluent nHibernate

    - by alex
    Is it possible to use something like this wrapper with fluent configuration? http://jeffreypalermo.com/blog/use-this-nhibernate-wrapper-to-keep-your-repository-classes-simple/ If so, where would I add the fluent config? Also, would this be suited to use in both asp.net and windows applications? I'm planning to use the repository pattern, using this to create my nHibernate session?

    Read the article

  • Fluent NHibernate Column Mapping with Reserved Word

    - by Josh Close
    I've read that using a back tick ` should allow for using of reserved words. I'm using SQL Server and Fluent NHibernate and have a column name "File". If I map it with "`File" it tries using [Fil] so it's adding the brackets correctly, but dropping the "e" from the end. If I map it as "`Filee" it uses [File] correctly. Am I doing something wrong or is this a bug in NHibernate or Fluent Nhibernate?

    Read the article

  • ssh works fine when using public interface, but slow when using private interface

    - by Kevin M
    My Linux(UbuntuEEE) to Linux(CentOS) ssh takes a long time to log in(~15 seconds) when using the private interface, but not when using the public one. I have a Linux box acting as my router. As such, it has multiple interfaces(75.xxx.xxx.xxx, 192.168.1.1). I can ssh in from the internal interface(192.168.1.65 to .1), but it will take a while. I can ssh into the public address, and it goes quickly(~1 second). I have another box that I can ssh into the inside interface from and it goes quickly. iptables is set to accept packets coming into the interface immediately. sshd's UseDNS is normally on; I get the same problem if I turn it off and restart sshd. I normally use public-key authentication; I have done a mv ~/.ssh/ ~/ssh/ and it will ask me for a password after going slowly. After logging in(using either interface), speed is quick. ssh client version(via ssh -v):OpenSSH_4.7p1 Debian-8ubuntu1.2, OpenSSL 0.9.8g 19 Oct 2007 ssh server version(via rpm -qv openssh_server):openssh-server-4.3p2-29.el5

    Read the article

  • Consequences in PHP of implementing an interface through two different routes?

    - by Daniel Bingham
    What are the consequences of implementing the same interface through two different routes in PHP, are there any? What I mean, is something like this: interface baseInterface {} abstract class baseClass implements baseInterface { } interface myInterface extends baseInterface {} class myClass extends baseClass implements myInterface {} In this case myClass implements baseInterface from two different parents - myInterface and baseClass. Are there any consequences to this? My instinct is that PHP should handle this fine, but I just want to make sure. What exactly does PHP do in this case? Does it just check to see that the necessary functions are implemented for the interface each time it discovers it and call it a day or does it do something more?

    Read the article

  • Fluent config not generating mapping files

    - by rboarman
    Hello, I am trying to get Fluent nHibernate to generate mappings so I can take a look at the files and the sql. My code is based on this post and on what I can glean from the documentation. http://stackoverflow.com/questions/1375146/fluent-mapping-entities-and-classmaps-in-different-assemblies I am using the latest code from git. Here’s my config code: Configuration cfg = new Configuration(); var ft = Fluently.Configure(cfg); //DbConnection by fluent ft.Database ( MsSqlConfiguration .MsSql2008 .ConnectionString("……") .ShowSql() .UseReflectionOptimizer() ); //get mapping files. ft.Mappings(m => { //set up the mapping locations m.FluentMappings.AddFromAssemblyOf<Entity>() .ExportTo(@"C:\temp"); m.Apply(cfg); }); I also tried: var sessionFactory = Fluently.Configure() .Database(MsSqlConfiguration .MsSql2008 .ShowSql() .ConnectionString(“……")) .Mappings(p => p.FluentMappings .AddFromAssemblyOf<Entity>() .ExportTo(@"c:\temp\")) .BuildSessionFactory(); I have verified that the connection string is correct. The issue is that no mapping files show up in the ExportTo folder and no sql code shows up in the output window or in the log file. No errors or exceptions are generated either. I have no idea where to go from here. Thank you in advance. Rick

    Read the article

  • converting to Fluent NHibernate sessionmanager

    - by czuroski
    Hello, I am changing my application to use Fluent NHibernate. I have created my Fluent mapping files and have now moved onto configuring my Session Manager. Currently, I use the following code - private ISessionFactory GetSessionFactory() { return (new Configuration()).Configure().BuildSessionFactory(); } Along with my hibernate.cfg.xml - <?xml version="1.0" encoding="utf-8" ?> <hibernate-configuration xmlns="urn:nhibernate-configuration-2.2" > <session-factory> <property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property> <property name="dialect">NHibernate.Dialect.InformixDialect1000</property> <property name="connection.driver_class">NHibernate.Driver.OleDbDriver</property> <property name="connection.connection_string">Provider=Ifxoledbc.2;Password=mypass;Persist Security Info=True;User ID=myid;Data Source=mysource</property> <property name="proxyfactory.factory_class">NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle</property> <property name="show_sql">false</property> <mapping assembly="DataTransfer" /> </session-factory> </hibernate-configuration> Does anyone know how I could transfer this to Fluent? The problem I have having is with the Database portion of the configuration. Thanks for any thoughts.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >