telerik-open-access

Error in using Embeded Firebird

被刻印的时光 ゝ 提交于 2019-12-12 05:16:21
问题 I used telerik OpenAccess to connect to firebird Database with this ConnectionString : "ServerType=1;User=SYSDBA;Password=masterkey;Dialect=3;Database=TEST.fdb" and when i want to select my tables i get this error : I download Firebird-2.5.1.26351-0_x64_embed.zip and copy the following File in my output folder: fbembed.dll firebird.conf firebird.msg ib_util.dll icuin30.dll icudt30.dll icuuc30.dll 回答1: Use ClientLibrary connection string parameter to specify where the fbembed.dll is (or put it

“Argument expression is not valid” error with EF4 Linq sub select query

浪尽此生 提交于 2019-12-11 17:17:06
问题 Any ideas as to why this query compiles, but then throws this runtime error: Argument expression is not valid I know I could change my db model, but in this case it's not possible. Any ideas how to get something like this working? Not even sure what this would be called. Thanks. DBContext db = new DBContext(); var books = (from b in db.BOOKS select new { b.ID, b.NAME, AuthorName = db.PEOPLEs.Where(p=>p.ID==b.AUTHOR).First().USER_ID, }).ToList(); 回答1: I've found I have the best luck with

Virtual file not found using servicestack 4.0.5 after adding Telerik OpenAccess datacontext

白昼怎懂夜的黑 提交于 2019-12-11 00:58:34
问题 I'm testing out the new 4.0.5 Service stack (previously I was using version 3), and starting afresh I just can't seem to get my service to start when I add Telerik OpenAccess. I'm using Telerik's OpenAccess to talk to a MSSQL database again, which all works fine using version 3.x - As soon as I add in the Telerik Domain model I get a "Virtual File Not Found" Virtual file not found Description: An unhandled exception occurred during the execution of the current web request. Please review the

Iterate through properties and values of an object returned via a linq query on a domain model

你离开我真会死。 提交于 2019-12-03 04:44:06
问题 I have a custom entity in a relational database that I have mapped to the CLR via a domain model. So by using the following statement, I can pull in an entity from my database into memory via a LINQ query on the domain model, like so; var inspection = (from i in dbContext.New_testinspectionExtensionBases where i.New_testinspectionId == currentInspection select i).First(); There are properties/fields on this entity that I need access to, I need to be able to determine the property/field name

Iterate through properties and values of an object returned via a linq query on a domain model

↘锁芯ラ 提交于 2019-12-02 19:02:24
I have a custom entity in a relational database that I have mapped to the CLR via a domain model. So by using the following statement, I can pull in an entity from my database into memory via a LINQ query on the domain model, like so; var inspection = (from i in dbContext.New_testinspectionExtensionBases where i.New_testinspectionId == currentInspection select i).First(); There are properties/fields on this entity that I need access to, I need to be able to determine the property/field name as well as it's value. I want to loop through these items in memory, and write out their names and

IQueryable.Distinct() vs List.Distinct()

旧时模样 提交于 2019-12-01 19:39:36
问题 I have a linq query that I am using Distinct() on. If I just call Distinct() without converting to a List then it does not return a distinct list - it still contains duplicates. However if I convert to a List and then call Distinct() - it works as expected and I only get unique objects. I'm using Telerik ORM and the objects being returned are the class representing one of the tables in the database. var uniqueUsers = (from u in Database.Users select u).Distinct(); The code above does not

Comparing equal datetimes not comparing

只谈情不闲聊 提交于 2019-11-30 18:49:55
I have a query with how datetimes are compared/stored in C#. Consider the following code: var createdDate = DateTime.Now; using (cr = new LanguageDictionaryRepository(ds)) { cr.Add(new Sybrin10.Data.DTO.LanguageDictionary() { Active = true, CreatedDate = createdDate, CultureCode = cultureCode, Data = new System.Text.UTF8Encoding().GetBytes("Test") }); cr.Save(); var y = cr.FindBy(x => x.CultureCode == cultureCode && x.CreatedDate == createdDate).FirstOrDefault(); Assert.IsNotNull(y); The Assert.IsNotNull is failing because of the datetime check. I would expect that as the LanguageDictionary

Comparing equal datetimes not comparing

依然范特西╮ 提交于 2019-11-30 01:57:07
问题 I have a query with how datetimes are compared/stored in C#. Consider the following code: var createdDate = DateTime.Now; using (cr = new LanguageDictionaryRepository(ds)) { cr.Add(new Sybrin10.Data.DTO.LanguageDictionary() { Active = true, CreatedDate = createdDate, CultureCode = cultureCode, Data = new System.Text.UTF8Encoding().GetBytes("Test") }); cr.Save(); var y = cr.FindBy(x => x.CultureCode == cultureCode && x.CreatedDate == createdDate).FirstOrDefault(); Assert.IsNotNull(y); The

How to handle DBContext when using Ninject

↘锁芯ラ 提交于 2019-11-27 08:03:11
I am trying to use Ninject and OpenAccess for the first time. Please help me with the following. Here is what my project looks like... public class ContentController : Controller { private ContentService contentSvc; public ContentController(ContentService contentSvc) { this.contentSvc = contentSvc; } } The following class is under a folder in my web app. public class ContentService { private IContentRepository contentRepository; public ContentService(IContentRepository contentRepository) { this.contentRepository = contentRepository; } public void InsertContent(Content content) {

How to handle DBContext when using Ninject

青春壹個敷衍的年華 提交于 2019-11-26 11:09:32
问题 I am trying to use Ninject and OpenAccess for the first time. Please help me with the following. Here is what my project looks like... public class ContentController : Controller { private ContentService contentSvc; public ContentController(ContentService contentSvc) { this.contentSvc = contentSvc; } } The following class is under a folder in my web app. public class ContentService { private IContentRepository contentRepository; public ContentService(IContentRepository contentRepository) {