ormlite-servicestack's questions - Indonesian 1answer

0 ormlite-servicestack questions.

I'm a beginner who has just started using ServiceStack.OrmLite. I have a question. How can I get all the objects associated through the intermediate table? details as following: Public class book { ...

How can I get the scalar output from Stored Procedure? When I execute the below statement, it returns DBNull. We are using ServiceStack.OrmLite 4.5.8 var le = db.<<SP Name>>(param1, ...

When joining two tables I get ArgumentNullException: Value cannot be null. Parameter name: key. This happens after executing the query, change any line in Linqpad and execute again. using (var db =...

After reading the documentation, I am not sure but I have come to the conclusion that when creating QueryDb, you cannot choose the columns to join by? And I am under the impression, you must have DTO ...

I have the following POCO class, where Date is defined as a string and will always conform to the following format 'yyyyMMdd' public class Price { [AutoIncrement] public int Id {get;set;} ...

I think this should be easy, and I'm not sure if I'm just missing something or if this feature is missing from ServiceStack/ORMLite currently. I've got a tablestructure that looks something like this: ...

I have a function that returns SqlExpressionVisitor to be used later as an input to Select statements. private SqlExpressionVisitor<Account> GetExpressionVisitor (int id, bool detailed, ...

I'm having some troubles selecting a Tuple of Objects from my custom SQL query with ORMLite. I have the following code: var query = "select definition.*, timeslot.*, type.* from <blah blah>"; ...

I am new to ServiceStack & OrmLite, during my work, I frequently come across SqlExpressionVisitor And my question is: What is it basically? and what are the benefits of using it? And can I get ...

Reading the documentation for ORMLite, it says to register the Connection Factory as a singleton if you're using an IoC container. Is this the correct syntax for that with ASPNET Core 2.0? Or should ...

For the last 10+ years or so, I have always opened a connection the database (mysql) and kept it open, until the application closed. All queries was executed on the connection. Now, when I see ...

We are currently using ORMLite and it is working really well. One of the places that we are using it is for running large batch processes. These processes run a single large batch all within a single ...

Can OrmLite recognize differences between my POCO and my schema and automatically add (or remove) columns as necessary to force the schema to remain in sync with my POCO? If this ability doesn't ...

Asked this question a few days ago but maybe wasn't too specific. Basically, I'm writing a console app that accepts a list of stored procedure names and arbitrarily executes them. The app is supposed ...

Some 4 years ago, I asked this question. I then decided not to use OrmLite at that point, but I am back at it now again. This time, I would like to know where I add the code for adding runtime ...

I'm currently writing a console app that kicks off a number of stored procedures in our (Sql Server) database. The app is primarily responsible for executing the procedures, logging events to a number ...

Currently, I am using OrmLite for DB operations. I am also planning to use Dapper ORM, but can anyone point me how to integrate DapperORM in ServiceStack. Do I need to implement both IDbConnection and ...

I can see you can do stuff like this in ORMLite: var customer = new Customer { Name = "Customer 1", PrimaryAddress = new CustomerAddress { AddressLine1 = "1 Australia Street", ...

I keep on getting the following compilation error message (" The type or namespace name 'OrmLite' does not exist in the namespace 'ServiceStack' (are you missing an assembly reference?)"). This is ...

In my web application i have used servicestack ormlite cache client on sql server. Yesterday my sql server get stuck at 99% of CPU and the thing that helped me to restore everything was to delete ...

I try to add SqlGeography to my model and when I call create table I got weird error. First I add this package: Microsoft.SqlServer.Types Then I create my model like example at below: public class ...

Postgres have an index type called GIN which I need to use, but I have not figured out how to actually achieve this with ServiceStack.OrmLite other than running a handwritten query after creating my ...

I need simple search functionality in different tables through my application, so I was thinking creating a GenericFilter class, passing a query and some conditions and return the results in some way. ...

I have a simple Id in my model like this: [AutoIncrement] public Int32 Id { get; set; } It auto-increments whenever a new record is inserted, but it always begins with 0. What if I wanted to ...

I am trying to use Sqlite as a memory database with ServiceStack ORMlite in my unit tests. If I run my tests with SQLite saving to a file, ie. using the connectionstring "Data Source=|...

I am using OrmLite with F# on Mono. I have the following basic structure: type NestedTree() = static member val table_name = String.Empty with get, set //DB fields [<AutoIncrement>]...

is there an equivalent of ISNULL in SQL for OrmLite? I tried adding [Default(typeof(int),"-1")] to my class model, but had no luck.. I'm working with MVC5 and C#

I am using Ormlite.Oracle to do something like this: using (var db = dbFactory.Open()) { var events = db.From<Event>() .Where(row => row....

We have just upgraded some software we have from ServiceStack 4.0.62 to ServiceStack 5.0.0.0. For some reason ormlite's encoding management seem to have changed. Code that simply saves a DTO with a ...

I have models like: class Request { public int RequestId {get;set;} [Reference] public List<Package> Packages {get;set;} } class Package { public int PackageId {get;set;} ...

I'm working with an existing WebApi that uses SimpleInjector to register a single database connection. I need to make an endpoint to get info from a different db but I don't know how to register a new ...

I have a table CREATE TABLE [dbo].[ServiceTestCase]( [SSN] [int] IDENTITY(600000001,1) NOT NULL, [Description] [varchar](max) NULL, [EmbeddedResponse] [varchar](max) NULL, [...

Referenced Code Problem I'm Trying To Solve Make ValuationsCommanderTests.SetTransactionAndRelatedEmbeddedDerivativevaluationsToBad_ValidInput_CorrectlyManipulatesDB() pass. Attempts To Resolve ...

I have a query involving several tables, and I need to select only few columns of the result. I've looked everywhere with no luck, the few things I tried did not work. Can someone point me to the ...

I have the following class: [Schema("dbo")] [Alias("accesses")] public class Acces{ [Alias("id")] public int Id { get; set; } [Alias("device_id")] public string DeviceId { get; set; }...

I was wondering about doing nested queries using ORMLite. I need it to reduce the cardinality of a table in order to have a lighter join. Basically, I'd need something to build the following SQL ...

I like to keep my data models clean (and not dependent on any Servicestack DLLs) by defining any attributes just in the database layer. However since upgrading to ver 5.0, my application fails to ...

I'm trying to explore the functionality of ServiceStack.OrmLite and can't understand if it possible to use bootstrap class for configuration (foreign keys, data types, column indexes, aliases etc.)? I ...

I have this SQL code, and I want this converted to ormlite - but I don't know how to do this the best way. SELECT * FROM Job INNER JOIN Emp ON Job.JobAnsvarID = Emp.EmpId LEFT JOIN (SELECT JobId, ...

I have the following MVC 5 Model: [Schema("dbo")] [Alias("map")] public class Map { [PrimaryKey] [Alias("id")] public int Id { get; set; } [Alias("name")] public String Name { ...

I'm having some issues with selecting the same model twice and more times with ORMLite. My query does various LeftJoin<Model1,Model2>, and then it does something like this: .LeftJoin<Model2,...

I'm using ORMLite and I have a foreign key relationship defined between an invoice DTO and invoice line DTO: public interface IDto<PKType> where PKType : struct { [Required(ErrorMessage = "...

We share a single poco's with ServiceStack WebServices ServiceStack Orm with MySQL Xamarin mobile client that uses Sqlite.net. Problem is the shared classes have become a mess. [...

We have a process that needs to create a sql lite database with a couple tables with about 750k records/100mb. It gets uploaded somewhere else (Azure Storage Blob). I know Azure App's have very slow ...

I just started using Service Stack ORMLite for SQL Server and not able to figure out a few things. Let me show you by example, what I am trying to achieve: I have 2 tables - Users and Roles public ...

var results = await db.SelectAsync<dynamic>(q); If I do ToJson() on the results, the names stay in PascalCase and not in CamelCase even if I use ToCamelCase() var results = await db....

Is it possible to generate SQL scripts using OrmLite without executing it against a database? I would like to load a list of DTOs from a live SqlServer database and output a script to DELETE and ...

How do I change the serialization method for Guids in OrmLite.MySql for ServiceStack 4? Version 3 with MySQL stored Guids as text without dashes, and likewise didn't use dashes for comparisons. ...

I am trying to extend servicestack autoquery viewer in Admin page but I get the following issue in console and I can't open it: AutoQuery.tsx:83 Uncaught TypeError: b.attributes.filter is not a ...

I am trying to so the following: var routines = con.Select<Table>(con.From<Table>().OrderBy(p => p.Field1).ThenBy(i => i.Field2)); The above works perfectly. But I want a rather ...

Related tags

Hot questions

Language

Popular Tags