Search Results

Search found 186 results on 8 pages for 'subsonic'.

Page 6/8 | < Previous Page | 2 3 4 5 6 7 8  | Next Page >

  • How do I use SimpleRepository without the migration approach?

    - by Bill Sempf
    I am evaluating SubSonic for use in Phase 2 of a large project. This is an ASP.NET project, with 700 tables in a SQL Server database. We are planning for our domain model to consist of POCO classes to assist with an offline access requirements we have. I believe that the SimpleRepository pattern would be among my best options. Since I have a database already, however, the migration assistance doesn't help me. Are there T4 templates for SimpleRepository that I just overlooked? How do I 'turn off' migration? If I missed something in the Wiki, point me there, otherwise get me started and I'll write up a Wiki entry for y'all when we get there.

    Read the article

  • Error when compiling a WinForms project that uses SubSonic library

    - by Mike Devenney
    The code generation is working but I get the following errors when I try to build the project: Error 4 Source file '...Project Path...\Structs.cs' could not be opened ('Unspecified error ') PPSGenerator Error 5 Source file '...Project Path...\Context.cs' could not be opened ('Unspecified error ') PPSGenerator Error 6 Source file '...Project Path...\ActiveRecord.cs' could not be opened ('Unspecified error ') PPSGenerator Error 7 Source file '...Project Path...\StoredProcedures.cs' could not be opened ('Unspecified error ') PPSGenerator I'm using VS2010 on a Windows 7 64 bit machine. Project is targeting Framework 3.5... any ideas? Also noticed the following warnings, but not sure that these are as important: Warning 1 The C# 2.0 and C# 3.5 compilers are no longer supported. Templates will always be compiled with the version 4 compiler instead of 'v3.5' as specified. ...ProjectPath...\Structs.tt 1 4 Warning 2 Multiple template directives were found in the template. All but the first one will be ignored. Multiple parameters to the template directive should be specified within one template directive. ...ProjectPath...\Settings.ttinclude 1 4 Warning 3 Compiling transformation: The variable 'parameters' is assigned but its value is never used ...ProjectPath...\SQLServer.ttinclude 92 15 Thanks! Mike D

    Read the article

  • Errors when creating a custom Querable object with MVC and Subsonic pagedlist

    - by minus4
    hiya, i have the following code but when i try and create a new IQuerable i get an error that the interface cannot be implemented, if i take away the new i get a not implemented exception, have had to jump back and work on some old ASP classic sites for past month and for the life of me i can not wake my brain up into C# mode. Could you please have a look at below and give me some clues on where i'm going wrong: The code is to create a list of priceItems, but instead of a categoryID (int) i am going to be showing the name as string. public ActionResult ViewPriceItems(int? page) { var crm = 0; page = GetPage(page); // try and create items2 IQueryable<ViewPriceItemsModel> items2 = new IQueryable<ViewPriceItemsModel>(); // the data to be paged,but unmodified var olditems = PriceItem.All().OrderBy(x => x.PriceItemID); foreach (var item in olditems) { // set category as the name not the ID for easier reading items2.Concat(new [] {new ViewPriceItemsModel {ID = item.PriceItemID, Name = item.PriceItem_Name, Category = PriceCategory.SingleOrDefault( x => x.PriceCategoryID == item.PriceItem_PriceCategory_ID).PriceCategory_Name, Display = item.PriceItems_DisplayMethod}}); } crm = olditems.Count() / MaxResultsPerPage; ViewData["numtpages"] = crm; ViewData["curtpage"] = page + 1; // return a paged result set return View(new PagedList<ViewPriceItemsModel>(items2, page ?? 0, MaxResultsPerPage)); } many thanks

    Read the article

  • Having an issue with Nullable MySQL columns in SubSonic 3.0 templates

    - by omegawkd
    Looking at this line in the Settings.ttinclude string CheckNullable(Column col){ string result=""; if(col.IsNullable && col.SysType !="byte[]" && col.SysType !="string") result="?"; return result; } It describes how it determines if the column is nullable based on requirements and returns either "" or "?" to the generated code. Now I'm not too familiar with the ? nullable type operator but from what I can see a cast is required. For instance, if I have a nullable integer MySQL column and I generate the code using the default template files it returns a line similar to this: int? _User_ID; When trying to compile the project I get the error: Cannot implicitly convert type 'int?' to 'int'. An explicit conversion exists (are you missing a cast?) I checked teh Settings files for the other database types and they all seems to have the same routine. So my question is, is this behaviour expected or is this a bug? I need to solve it one way or the other before I can procede. Thanks for your help.

    Read the article

  • Adding DataAnnontations to Generated Partial Classes

    - by Naz
    Hi I have a Subsonic3 Active Record generated partial User class which I've extended on with some methods in a separate partial class. I would like to know if it is possible to add Data Annotations to the member properties on one partial class where it's declared on the other Subsonic Generated one I tried this. public partial class User { [DataType(DataType.EmailAddress, ErrorMessage = "Please enter an email address")] public string Email { get; set; } ... } That examples gives the "Member is already defined" error. I think I might have seen an example a while ago of what I'm trying to do with Dynamic Data and Linq2Sql.

    Read the article

  • Updating my database

    - by Malcolm
    I am new with the subsonic, and I have a problem when trying to update the database from the sql server. I have created a gridview by still is not returning the updates results. can you please help me? its getting an error code on dc.AddMostaHse(); (Cannot implicity convert type 'void to 'object') Here is the code being done of DataAccess.cs page public void AddMostaHse() { Mosta.MostaHSE1 xx = new MostaHSE1(); xx.ID = 94; xx.FunctionLocation = "lza94"; xx.acno = 12; xx.Save(); } Binding it with the gridview. { DataAccess dc = new DataAccess(); gvtest.DataSource = dc.AddMostaHse(); gvtest.DataBind(); }

    Read the article

  • Paging with Find using Active Record

    - by Brian Rizzo
    I can't seem to find an answer to this question or a good example of how to accomplish what I am trying to do. I'm sure it's been posted or explained somewhere, but I am having trouble finding the exact solution I need. I am using ActiveRecord in Subsonic 3.0.0.3. When I do something like recordset = VehicleModel.Find(x => x.Model.StartsWith(SearchText)); I get back an IList of VehicleModel objects (or more simply a recordset), this is fine until I return too many records. I also cannot order the returned set of records (my grid will do this fine, but i'm sure it will be too slow if i have too many records). Being that Find is returning an IList there isn't much that I can run directly against this (again I may be overlooking something simple so please don't kill me). My question is can someone explain how to find data like i am above, sort it and get a page of data where a page is of size n? Am I going about this wrong? Am I even close to being on the right track?

    Read the article

  • Executing sequential stored procedures; works in query analyzer, doesn't in my .NET application

    - by evanmortland
    Hello, I have an audit record table that I am writing to. I am connecting to MyDb, which has a stored procedure called 'CreateAudit', which is a passthrough stored procedure to another database on the same machine called MyOther DB with a stored procedure called 'CreatedAudit' as well. In other words in MyDB I have CreateAudit, which does the following EXEC dbo.MyOtherDB.CreateAudit. I call the MyDb CreateAudit stored procedure from my application, using subsonic as the DAL. The first time I call it, I call it with the following (pseudocode): Result = CreateAudit(recordId, "Opened") One line after that, I call: Result2 = CreateAudit(recordId, "Closed") In my second stored procedure it is supposed to mark the record that was created by the CreateAudit(recordId, "Opened") with a status of closed. It works great if I run them independently of one another, but when they run in sequence in the application, the record is not marked as "Closed". When I run SQL profiler I see that both queries ran, and if I copy the queries out and run them from query analyzer the record gets marked as closed 100% of the time! When I run it from the application, about once every 20 times or so, the record is successfully marked closed - the other 19 times nothing happens, but I do not get an error! Is it possible for the .NET app to skip over the ouput from the first stored procedure and start executing the second stored procedure before the record in the first is created? When I add a "WAITFOR DELAY '00:00:00:003'" to the top of my stored procedure, the record is also closed 100% of the time. My head is spinning, any ideas why this is happening! Thanks for any responses, very interested in hearing how this can happen.

    Read the article

  • Which ORM to use?

    - by Paja
    I'm developing an application which will have these classes: class Shortcut { public string Name { get; } public IList<Trigger> Triggers { get; } public IList<Action> Actions { get; } } class Trigger { public string Name { get; } } class Action { public string Name { get; } } And I will have 20+ more classes, which will derive from Trigger or Action, so in the end, I will have one Shortcut class, 15 Action-derived classes and 5 Trigger-derived classes. My question is, which ORM will best suit this application? EF, NH, SubSonic, or maybe something else (Linq2SQL)? I will be periodically releasing new application versions, adding more triggers and actions (or changing current triggers/actions), so I will have to update database schema as well. I don't know if EF or NH provides any good methods to easily update the schema. Or if they do, is there any tutorial how to do that? I've already found this article about NH schema updating, quoting: Fortunately NHibernate provides us the possibility to update an existing schema, that is NHibernate creates an update script which can the be applied to the database. I've never found how to actually generate the update script, so I can't tell NH to update the schema. Maybe I've misread something, I just didn't found it. Last note: If you suggest EF, will be EF 1.0 suitable as well? I would rather use some older .NET than 4.0.

    Read the article

  • Can a second stored procedure doing the same thing finish before first one?

    - by evanmortland
    Hello, I have an audit record table that I am writing to. I am connecting to MyDb, which has a stored procedure called 'CreateAudit', which is a passthrough stored procedure to another database on the same machine called 'CreatedAudit' as well. I call the CreateAudit stored procedure from my application, using subsonic as the DAL. The first time I call it, I call it with the following (pseudocode): Result = CreateAudit(recordId, "Opened") Right after that, I call: Result2 = CreateAudit(recordId, "Closed") In my second stored procedure it is supposed to mark the record that was created by the CreateAudit(recordId, "Opened") with a status of closed. It works great if I run them independently of one another, but when they run in sequence in the application, the record is not marked as "Closed". When I run SQL profiler I see that both queries ran, and if I copy the queries out and run them from query analyzer the record gets marked as closed 100% of the time! When I run it from the application, about once every 20 times or so, the record is successfully marked closed - the other 19 times nothing happens, but I do not get an error! Is it possible for the .NET app to skip over the ouput from the first stored procedure and start executing the second stored procedure before the record in the first is created? When I add a "WAITFOR DELAY '00:00:00:003'" to the top of my stored procedure, the record is also closed 100% of the time. My head is spinning, any ideas why this is happening! Thanks for any responses, very interested in hearing how this can happen.

    Read the article

  • Left Join in Subsonic3

    - by muek
    Hi there, I'm new in subsonic3, and I'm getting some errors when I try to use LeftJoin var q = from c in categories join p in products on c equals p.Category into ps from p in ps.DefaultIfEmpty() select new { Category = c, ProductName = p == null ? "(No products)" : p.ProductName }; The error is "System.Collections.Generic.Enumerable '...' cannot be used for parameter of type System.Linq.IQueryable Does anyone had this error before? Did you fix it? Thanks

    Read the article

  • Inner Join with more than a field

    - by Leandro
    Precise to do a select with inner join that has relationship in more than a field among the tables Exemple: DataSet dt = new Select().From(SubConta.Schema) .InnerJoin(PlanoContabilSubConta.EmpSubContaColumn, SubConta.CodEmpColumn) .InnerJoin(PlanoContabilSubConta.FilSubContaColumn, SubConta.CodFilColumn) .InnerJoin(PlanoContabilSubConta.SubContaColumn, SubConta.TradutorColumn) .Where(PlanoContabilSubConta.Columns.EmpContabil).IsEqualTo(cEmp) .And(PlanoContabilSubConta.Columns.FilContabil).IsEqualTo(cFil) .And(PlanoContabilSubConta.Columns.Conta).IsEqualTo(cTrad) .ExecuteDataSet(); But the generated sql is wrong: exec sp_executesql N'/* GetDataSet() */ SELECT [dbo].[SubContas].[CodEmp], [dbo].[SubContas].[CodFil], [dbo].[SubContas].[Tradutor], [dbo].[SubContas].[Descricao], [dbo].[SubContas].[Inativa], [dbo].[SubContas].[DataImplantacao] FROM [dbo].[SubContas] INNER JOIN [dbo].[PlanoContabilSubContas] ON [dbo].[SubContas].[CodEmp] = [dbo].[PlanoContabilSubContas].[EmpSubConta] INNER JOIN [dbo].[PlanoContabilSubContas] ON [dbo].[SubContas].[CodFil] = [dbo].[PlanoContabilSubContas].[FilSubConta] INNER JOIN [dbo].[PlanoContabilSubContas] ON [dbo].[SubContas].[Tradutor] = [dbo].[PlanoContabilSubContas].[SubConta] WHERE EmpContabil = @EmpContabil0 AND FilContabil = @FilContabil1 AND Conta = @Conta2 ',N'@EmpContabil0 varchar(1),@FilContabil1 varchar(1),@Conta2 varchar(1)',@EmpContabil0='1',@FilContabil1='1',@Conta2='1' What should be made to generate this sql? exec sp_executesql N'/* GetDataSet() */ SELECT [dbo].[SubContas].[CodEmp], [dbo].[SubContas].[CodFil], [dbo].[SubContas].[Tradutor], [dbo].[SubContas].[Descricao], [dbo].[SubContas].[Inativa], [dbo].[SubContas].[DataImplantacao] FROM [dbo].[SubContas] INNER JOIN [dbo].[PlanoContabilSubContas] ON [dbo].[SubContas].[CodEmp] = [dbo].[PlanoContabilSubContas].[EmpSubConta] AND [dbo].[SubContas].[CodFil] = [dbo].[PlanoContabilSubContas].[FilSubConta] AND [dbo].[SubContas].[Tradutor] = [dbo].[PlanoContabilSubContas].[SubConta] WHERE EmpContabil = @EmpContabil0 AND FilContabil = @FilContabil1 AND Conta = @Conta2 ',N'@EmpContabil0 varchar(1),@FilContabil1 varchar(1),@Conta2 varchar(1)',@EmpContabil0='1',@FilContabil1='1',@Conta2='1'

    Read the article

  • Subsonic 3, SimpleRepository, SQL Server: How to find rows with a null field?

    - by desautelsj
    How ca I use Subsonic's Find<T> method to search for rows with a field containing the "null" value. For the sake of the discussion, let's assume I have a c# class called "Visit" which contains a nullable DateTime field called "SynchronizedOn" and also let's assume that the Subsonic migration has created the corresponding "Visits" table and the "SynchronizedOn" field. If I was to write the SQL query myself, I would write something like: SELECT * FROM Visits WHERE SynchronizedOn IS NULL When I use the following code: var visits = myRepository.Find<Visit>(x => x.SynchronizedOn == null); Subsonic turns it into the following SQL query: SELECT * FROM Visits WHERE SynchronizedOn == null which never returns any rows. I tried the following code but it throws an error: visits = repository.Find<Visit>(x => x.SynchronizedOn.HasValue); I was able to use the following syntax: var query = from v in repository.All<Visit>() where v.SynchronizedOn == null orderby v.CreatedOn select v; visits = query.ToList<Visit>(); but it's not as nice an short as using the Find<T> method. Anyone knows how I can specify the "SynchronizedOn IS NULL" condition in the Find<T> method?

    Read the article

  • Where do I file bugs for the Ubuntu One music client for Android?

    - by Jorge Castro
    I've recently started using the Ubuntu One Music streaming client for Android. From the web page it says that the android app is based on Subsonic. I want to file bugs on the app, mostly feature requests and things like that, and from looking at the screenshots, the application seems to be Subsonic preconfigured to use my U1 music collection. Is it appropriate for me to file feature requests with Subsonic, or is there a Launchpad project where we're supposed to file bugs which are then vetted and sent upstream?

    Read the article

  • Subconic3.0 with winform app

    - by Saif Khan
    Can subsonic 3.0 be used with a winform app? Do I need to add any references to the system.web? If it can be done, how can I exclude certain tables in the DB? Can I use the following whih I am using for subsonic 2.0 <providers> <!--<clear/>--> <add name="TEST" type="SubSonic.SqlDataProvider, SubSonic" connectionStringName="myString" includeTableList="CustomerReference" includeProcedureList=""/> </providers>

    Read the article

  • How should I take being told that I was wrong?

    - by Chris
    On a fairly important project with short timelines I decided to use SubSonic for straight forward data access. I wired up a handful of forms, created matching database tables and POCO's for each and used SubSonic's simple repository mode for the data access. Everything worked well and I was able to bang these forms out pretty quickly and I moved on to other things. Since that time I have heard that using SubSonic was a 'cowboy move' and that it was implemented 'incorrectly' and that 'the person who used it, didn't even know how to use SubSonic'. What I would like to know is, how should I take this? There were and still are no standards for data access at this company, so there is no violation of a standard. The forms worked exactly as requested and saved the data to the database correctly. And with only spending a few days on the forms instead of weeks, saved a lot of time which was used for other functionality in the project. So in light of all of this, I am confused as to what was 'incorrect'. Am I missing something here? Thanks for your answers.

    Read the article

  • Merits of .NET ORM data access methods Enity Framework vs. NHibernate vs. Subsonic vs. ADO.NET Datas

    - by Lloyd
    I have recently heard "fanboys" of different .NET ORM methodologies express strong, if not outlandish oppinions of other ORM methodologies. And frankly feel a bit in the dark. Could you please explain the key merits of each of these .NET ORM solutions? Entity Framework NHibernate Subsonic ADO.NET Datasets I have a good understanding of 1&4, and a cursory understanding of 2&3, but apparently not enough to understand the implied cultural perceptions of one towards the other.

    Read the article

  • Subsonic3 pre-generate code files

    - by silverfox1948
    I need to pre-generate my active record files, rather than have subsonic build them dynamically. I used to be able to do this using SubSonicCentral in SubSonic 2.x. How do I do this in SubSonic 3? I don't see a generator executable when I download the 3.0.0.4 zip file.

    Read the article

  • ActiveRecord fundamentally incompatible with composite keys?

    - by stimms
    I have been attempting to use subsonic for a project on which I'm working. All was going quite well until I encountered a link table with a composite primary key. That is a key made up of the primary keys of the two tables it joins. Subsonic failed to recognize both keys which was problematic. I was going to adjust subsonic to support compound keys but I stopped and though "Maybe there is a reason for this". Normally active record relies on a single primary key field for every record, even in link tables. But is this necessary? Should I just give up on active record for this project or continue with my modifications?

    Read the article

  • Does MVC replace traditional manually created BLL?

    - by used2could
    I'm used to creating the UI, BLL, DAL by hand (some times I've used LINQ-to-SQL or SubSonic for the DAL). I've done several small projects using MVC since its release. On these projects I've still continued to write a BLL and DAL by hand and then incorporate those into the MVC's models/controllers. I'm looking to optimize my time on projects this seems like overkill and a potential waste of time. Question Would it be acceptable to roll a DAL such as SubSonic and directly use it in the Models/Controllers of my MVC web app? Now the models & controllers would act as the BLL. I just see this as a major timesaver to not have to worry about another tier. UPDATE: I just wanted to add that my concern isn't really with the DAL (I frequently use SubSonic and NH) but rather focus on the BLL. Sorry for the confusion.

    Read the article

  • Help with Subsonic3 ActiveRecord LINQ query

    - by Saif Khan
    I have the following subsonic entities TInvoiceHeader TAccountAssociation How can I achieve the following in LINQ (subsonic) SELECT * from TInvoiceHeader WHERE custid IN (SELECT custid FROM TAccountAssociation WHERE username = 'a') I need to bind the results to a GridView.

    Read the article

< Previous Page | 2 3 4 5 6 7 8  | Next Page >