archive-be.com » BE » B » BENNYMICHIELSEN.BE

Total: 348

Choose link from "Titles, links and description words view":

Or switch to "Titles and links view".
  • Benny Michielsen – Page 3 – .net developer with a touch of Cocoa
    DbModelBuilder modelBuilder not possible only executed once var tableName schemaService LookupTheTableName loggedInCustomer modelBuilder Entity Customer ToTable tableName base OnModelCreating modelBuilder Useless approach since the model isn t being build again MvcApplication1Context myContext new MvcApplication1Context customer1 schemaService var csts context Customers ToList will go to the same tables as before because OnModelCreating is only executed once myContext new MvcApplication1Context customer2 schemaService var otherCsts context Customers ToList There is a constructor though on the DbContext class that takes a compiled model and using that one does allow you to tweak the mappings you are using in your application This also allows you to work with models that have been generated with a designer from 4 0 to use with the DbContext API build config from scratch DbModelBuilder builder new DbModelBuilder DbModelBuilderVersion V4 1 builder Configurations Add new EntityTypeConfiguration Customer lets change something for each customer var schemaName schemaService LookupTheTableName loggedInCustomer builder Entity Customer ToTable schemaName use the constructor that takes a compiled model context new MvcApplication1Context builder Build context Database Connection Compile You could then cache the compiled model for each customer so you don t need to take that hit every time Works like a charm I ll try to make it a bit easier to use Author BennyM Posted on 21 05 2011 21 05 2011 Categories Software Development 18 Comments on Entity Framework 4 1 Change mappings at runtime Entity Framework 4 1 Supporting Enums One of those features you think are so trivial are hard to miss if you use that latest new tool One of those is enum support in Entity Framework 4 1 just like in all other versions of the framework it just isn t there There is though a way to get around it unfortunately it does mean changing your model just a tiny bit In the sample class model I used for my previous posts on mapping inheritance each movie had an enum value to hold its media type DVD Bluray You won t see it mapped by default in your database if you use Entity Framework 4 1 out of the box So having the enum property there isn t enough you have to explicitly add an int property like below Required public virtual EMediaType MediaType get set public virtual int MediaTypeId get return int MediaType set MediaType EMediaType value And change your model mapping a bit inside your DbContext class if needed protected override void OnModelCreating DbModelBuilder modelBuilder modelBuilder Entity Movie Property x x MediaTypeId HasColumnName MediaType IsRequired base OnModelCreating modelBuilder You can still use the enum property in the rest of your application which I encourage Author BennyM Posted on 21 05 2011 Categories Software Development 5 Comments on Entity Framework 4 1 Supporting Enums NuGet install all packages referenced by a project When you install packages in a project using NuGet you probably don t want to include those in your version control system When you want to share some code in a blogpost you don t want to

    Original URL path: http://blog.bennymichielsen.be/page/3/ (2016-04-29)
    Open archived version from archive


  • diNovo Mini – Benny Michielsen
    blog entry with it If you ve had a pda or smartphone with a keyboard you ll feel right at home The best feature I ve discovered until now is the ok button which you can press with your left thumb while your scrolling with your other hand Very ergonomic The keyboard is also backlit orange meaning normal and green media center style It would appear that there is a light sensor on it so if there s enough light in the room the battery will be saved The lights of the keyboard and the clickpad also work seperately meaning that the keyboard lights only go on when you use it again to prevent waisting power The battery is a cell phone like model a charger is included as well as a cleaning aid to remove any fingerprints on the cover There s also a cd included haven t used it though I read that it comes with a program to bind key combinations to actions The clickpad however will need some time to grow on you since sometimes it s very sensitive and the other minute it s not very responsive this is the only negative remark I have for the moment I ll conclude with some picture my apologies for the bad quality you can click on them to see a bigger picture Author BennyM Posted on 08 04 2008 Categories Computer Tags dinovo htpc Leave a Reply Cancel reply Your email address will not be published Required fields are marked Comment Name Email Website Post navigation Previous Previous post Ms Sql 2000 script for BlogEngine NET Next Next post HTPC high definition for the masses Search Search for Search Follow me Recent Comments Rick on Partitioning and wildcards in an Azure Data Factory pipeline BennyM on WCF

    Original URL path: http://blog.bennymichielsen.be/2008/04/08/dinovo-mini/ (2016-04-29)
    Open archived version from archive

  • dinovo – Benny Michielsen
    is faster but this keyboard did not require any getting used to in fact I m typing this blog entry with it If you ve had a pda or smartphone with a keyboard you ll feel right at home The best feature I ve discovered until now is the ok button which you can press with your left thumb while your scrolling with your other hand Very ergonomic The keyboard is also backlit orange meaning normal and green media center style It would appear that there is a light sensor on it so if there s enough light in the room the battery will be saved The lights of the keyboard and the clickpad also work seperately meaning that the keyboard lights only go on when you use it again to prevent waisting power The battery is a cell phone like model a charger is included as well as a cleaning aid to remove any fingerprints on the cover There s also a cd included haven t used it though I read that it comes with a program to bind key combinations to actions The clickpad however will need some time to grow on you since sometimes it s very sensitive and the other minute it s not very responsive this is the only negative remark I have for the moment I ll conclude with some picture my apologies for the bad quality you can click on them to see a bigger picture Author BennyM Posted on 08 04 2008 Categories Computer Tags dinovo htpc Leave a comment on diNovo Mini Search Search for Search Follow me Recent Comments Rick on Partitioning and wildcards in an Azure Data Factory pipeline BennyM on WCF HTTPS And Request Entity Too Large Justin on WCF HTTPS And Request Entity Too Large The Morning

    Original URL path: http://blog.bennymichielsen.be/tag/dinovo/ (2016-04-29)
    Open archived version from archive

  • htpc – Benny Michielsen
    can play back movies or music rent the latest blockbuster online shop on iTunes etc A home build system on the other hand can do whatever you want it to do So I waited on Macworld in January hoping for an Apple TV update which had an optical drive and the introduction of iTunes rentals in Europe Alas Steve didn t bring anything for me well there was an Apple TV upgrade but that only affected the US market With the Apple idea now abandoned I looked to small form factor mini itx to be precise because that s what appealed me the most in the two Mac systems This site proved to be very useful it offers reviews shows what fits together and what not user projects and has an online shop If I had more experience in this matter and money was not a problem then I would probably have bought my parts here The absence of any helpful guides and how to s related with playing back HD content on any mini itx based system scared me I also didn t find any case which would take two 3 5 devices DVD BD ROM and hard disk and two full sized expansion cards So I just went for micro atx the path others had taken before me These sites proved to be very informative Vista XP Media Center Community AVS Forum Silent PC Review I read through the links above googled asked my colleagues and compiled my final list of components Case Antec NSK2480 Black Motherboard Asus P5B MX CPU Intel Core 2 Duo E4600 RAM 2GB Kingston 667 Mhz Harddisk Samsung HD SpinPoint T133 500GB SATA II 7200 Optical Drive Pioneer BDC 202BK Wlan DLink DWL G122 GPU Asus Radeon 3450 256 MB Let me comment on these I did not want the case to look like a computer this one has more of a HIFI look and it comes at a reasonable price The only thing I feared was that the front panel is silver while my optical drive is black The two did however fit together For the motherboard I went for the most basic around with enough connection abilities Asus has a variant of this one with onboard wifi but since I ve had problems in the past with wireless products of different manufactures working together I chose this one and added a wifi dongle to the shopping list I maxed out the RAM since memory these days has never had such low prices The hard disk with 500GB is more than enough I don t plan to use it to store data indefinitely but you can never have enough space The graphics card had to be able to play back high definition content but nothing more I was not going to play games or do any photo editing on this machine Now the only thing left was an affordable optical drive the Pioneer BDC 202BK was just what I needed It can

    Original URL path: http://blog.bennymichielsen.be/tag/htpc/ (2016-04-29)
    Open archived version from archive

  • Ms Sql 2000 script for BlogEngine.NET – Benny Michielsen
    State 1 Line 5 Line 5 Incorrect syntax near Msg 170 Level 15 State 1 Line 5 Line 5 Incorrect syntax near Msg 170 Level 15 State 1 Line 5 Line 5 Incorrect syntax near Msg 170 Level 15 State 1 Line 5 Line 5 Incorrect syntax near Msg 170 Level 15 State 1 Line 5 Line 5 Incorrect syntax near Reply dhaval parekh says 06 05 2008 at 03 42 Also I copied your script from a Forum post on Codeplex and ran it against the database and it said the following error Please let me know if you have found a solution to this problem Thanks Msg 156 Level 15 State 1 Line 9 Incorrect syntax near the keyword PRIMARY Msg 156 Level 15 State 1 Line 17 Incorrect syntax near the keyword PRIMARY Msg 156 Level 15 State 1 Line 18 Incorrect syntax near the keyword PRIMARY Msg 156 Level 15 State 1 Line 8 Incorrect syntax near the keyword PRIMARY Msg 156 Level 15 State 1 Line 9 Incorrect syntax near the keyword PRIMARY Msg 4902 Level 16 State 1 Line 1 Cannot alter table dbo be PostCategory because this table does not exist in database ccBlog Msg 4902 Level 16 State 1 Line 1 Cannot alter table dbo be PostCategory because this table does not exist in database ccBlog Msg 4902 Level 16 State 1 Line 1 Cannot alter table dbo be PostCategory because this table does not exist in database ccBlog Msg 4902 Level 16 State 1 Line 1 Cannot alter table dbo be PostCategory because this table does not exist in database ccBlog Msg 156 Level 15 State 1 Line 16 Incorrect syntax near the keyword PRIMARY Msg 4902 Level 16 State 1 Line 1 Cannot alter table dbo be PostComment because this table does not exist in database ccBlog Msg 4902 Level 16 State 1 Line 1 Cannot alter table dbo be PostComment because this table does not exist in database ccBlog Msg 156 Level 15 State 1 Line 9 Incorrect syntax near the keyword PRIMARY Msg 4902 Level 16 State 1 Line 1 Cannot alter table dbo be PostNotify because this table does not exist in database ccBlog Msg 4902 Level 16 State 1 Line 1 Cannot alter table dbo be PostNotify because this table does not exist in database ccBlog Msg 156 Level 15 State 1 Line 9 Incorrect syntax near the keyword PRIMARY Msg 4902 Level 16 State 1 Line 1 Cannot alter table dbo be PostTag because this table does not exist in database ccBlog Msg 4902 Level 16 State 1 Line 1 Cannot alter table dbo be PostTag because this table does not exist in database ccBlog Msg 1906 Level 11 State 1 Line 2 Cannot create an index on dbo be PostCategory because this table does not exist in database ccBlog Msg 1906 Level 11 State 1 Line 2 Cannot create an index on dbo be PostCategory because this table does not exist in database ccBlog

    Original URL path: http://blog.bennymichielsen.be/2008/04/03/ms-sql-2000-script-for-blogengine-net/ (2016-04-29)
    Open archived version from archive


  • ALTER TABLE dbo be PostNotify WITH CHECK ADD CONSTRAINT FK be PostNotify be Posts FOREIGN KEY PostID REFERENCES dbo be Posts PostID GO ALTER TABLE dbo be PostNotify CHECK CONSTRAINT FK be PostNotify be Posts GO Object Table dbo be PostTag Script Date 12 22 2007 14 17 44 SET ANSI NULLS ON GO SET QUOTED IDENTIFIER ON GO CREATE TABLE dbo be PostTag PostTagID int IDENTITY 1 1 NOT NULL PostID uniqueidentifier NOT NULL Tag nvarchar 50 NULL CONSTRAINT PK be PostTag PRIMARY KEY CLUSTERED PostTagID ASC ON PRIMARY GO ALTER TABLE dbo be PostTag WITH CHECK ADD CONSTRAINT FK be PostTag be Posts FOREIGN KEY PostID REFERENCES dbo be Posts PostID GO ALTER TABLE dbo be PostTag CHECK CONSTRAINT FK be PostTag be Posts GO Object Index FK PostID Script Date 12 22 2007 14 18 36 CREATE NONCLUSTERED INDEX FK PostID ON dbo be PostCategory PostID ASC GO Object Index FK CategoryID Script Date 12 22 2007 14 19 19 CREATE NONCLUSTERED INDEX FK CategoryID ON dbo be PostCategory CategoryID ASC GO Object Index FK PostID Script Date 12 22 2007 14 19 45 CREATE NONCLUSTERED INDEX FK PostID ON dbo be PostComment PostID ASC GO Object Index FK PostID Script Date 12 22 2007 14 20 29 CREATE NONCLUSTERED INDEX FK PostID ON dbo be PostNotify PostID ASC GO Object Index FK PostID Script Date 12 22 2007 14 20 43 CREATE NONCLUSTERED INDEX FK PostID ON dbo be PostTag PostID ASC Load initial Data INSERT INTO be Settings SettingName SettingValue VALUES alternatefeedurl INSERT INTO be Settings SettingName SettingValue VALUES authorname My name INSERT INTO be Settings SettingName SettingValue VALUES avatar combine INSERT INTO be Settings SettingName SettingValue VALUES blogrollmaxlength 23 INSERT INTO be Settings SettingName SettingValue VALUES blogrollupdateminutes 60 INSERT INTO be Settings SettingName SettingValue VALUES blogrollvisibleposts 3 INSERT INTO be Settings SettingName SettingValue VALUES contactformmessage I will answer the mail as soon as I can INSERT INTO be Settings SettingName SettingValue VALUES contactthankmessage Thank you The message was sent INSERT INTO be Settings SettingName SettingValue VALUES culture Auto INSERT INTO be Settings SettingName SettingValue VALUES dayscommentsareenabled 0 INSERT INTO be Settings SettingName SettingValue VALUES description Short description of the blog INSERT INTO be Settings SettingName SettingValue VALUES displaycommentsonrecentposts True INSERT INTO be Settings SettingName SettingValue VALUES displayratingsonrecentposts True INSERT INTO be Settings SettingName SettingValue VALUES email user example com INSERT INTO be Settings SettingName SettingValue VALUES emailsubjectprefix Weblog INSERT INTO be Settings SettingName SettingValue VALUES enablecommentsearch True INSERT INTO be Settings SettingName SettingValue VALUES enablecommentsmoderation True INSERT INTO be Settings SettingName SettingValue VALUES enablecontactattachments True INSERT INTO be Settings SettingName SettingValue VALUES enablecountryincomments True INSERT INTO be Settings SettingName SettingValue VALUES enablehttpcompression True INSERT INTO be Settings SettingName SettingValue VALUES enableopensearch True INSERT INTO be Settings SettingName SettingValue VALUES enablepingbackreceive True INSERT INTO be Settings SettingName SettingValue VALUES enablepingbacksend True INSERT INTO be Settings SettingName SettingValue VALUES enablerating True INSERT INTO be Settings SettingName SettingValue VALUES enablereferrertracking False INSERT INTO be Settings SettingName SettingValue

    Original URL path: http://blog.bennymichielsen.be/wp-content/uploads/MSSQLSetup1.3.0.0.sql.txt (2016-04-29)
    Open archived version from archive

  • blogengine – Benny Michielsen
    entries from the DataStoreSettings I ve included the insert statement the default script that ships with BE 1 4 5 has an update statement in place for that entry in the DB MSSQL2000 UpgradeTo1 4 5 0From1 4 0 0 sql 3 20 kb Finally if you are running SQL Membership and Role provider and are upgrading from an earlier version don t forget to check the applicationName of the providers in 1 4 this changed from BlogEngine Net to BlogEngine What you need to change is described in my earlier post Author BennyM Posted on 05 08 2008 Categories Computer Tags blogengine script sql update 4 Comments on Updated to BlogEngine 1 4 5 Blogging tools Since there s no code highlighter that works for me in Blogengine Net I use this site It pretty much supports any language paste your code select some options and you get your html to use To check my spelling I use this site I ve been using it for years now Though I don t need it when I m using my Mac since it checks everything you write regardless the application you are using Author BennyM Posted on 13 07 2008 Categories Computer Tags blog blogengine tools 1 Comment on Blogging tools Updated to BlogEngine 1 4 Yesterday a new version of BlogEngine was released grab it here For instructions on how to upgrade you should visit this site and since I m not running under the default settings there was some extra work to do My host still runs MS SQL 2000 and the default BE script is for MS SQL 2005 I ve edited both the upgrade and full install script so they run on the older version you can download them here MSSQL 2000 Setup1 4 0 0 sql 22 15 kb MSSQL 2000 Upgrade1 4 0 0 sql 7 18 kb Also if you are running SQL Membership and SQL Role Provider don t forget to change the default provider in your web config to SQLMembershipProvider and SQLRoleProvider respectively you should also change the applicationName in these providers to BlogEngine NET For some reason the developers changed this which will lead to problems Alternatively if you want to keep the new name BlogEngine instead of the old BlogEngine NET you should edit the row in the aspnet Applications table where the application name is BlogEngine NET Change the value of the ApplicationName to BlogEngine and the LoweredApplicationName to blogengine Author BennyM Posted on 02 07 2008 Categories Computer Tags blogengine script sql update 2 Comments on Updated to BlogEngine 1 4 Updated BlogEngine NET scripts It was brought to my attention that the next release of BE will have some changes in the database scheme I ve compared the new script with the old one and the only changes at the moment of this writing are two new tables Since the tables both use varbinary max they are not compatible with MS SQL 2000 I ve changed

    Original URL path: http://blog.bennymichielsen.be/tag/blogengine/ (2016-04-29)
    Open archived version from archive

  • script – Benny Michielsen
    it was missing then and we are deleting all entries from the DataStoreSettings I ve included the insert statement the default script that ships with BE 1 4 5 has an update statement in place for that entry in the DB MSSQL2000 UpgradeTo1 4 5 0From1 4 0 0 sql 3 20 kb Finally if you are running SQL Membership and Role provider and are upgrading from an earlier version don t forget to check the applicationName of the providers in 1 4 this changed from BlogEngine Net to BlogEngine What you need to change is described in my earlier post Author BennyM Posted on 05 08 2008 Categories Computer Tags blogengine script sql update 4 Comments on Updated to BlogEngine 1 4 5 Updated to BlogEngine 1 4 Yesterday a new version of BlogEngine was released grab it here For instructions on how to upgrade you should visit this site and since I m not running under the default settings there was some extra work to do My host still runs MS SQL 2000 and the default BE script is for MS SQL 2005 I ve edited both the upgrade and full install script so they run on the older version you can download them here MSSQL 2000 Setup1 4 0 0 sql 22 15 kb MSSQL 2000 Upgrade1 4 0 0 sql 7 18 kb Also if you are running SQL Membership and SQL Role Provider don t forget to change the default provider in your web config to SQLMembershipProvider and SQLRoleProvider respectively you should also change the applicationName in these providers to BlogEngine NET For some reason the developers changed this which will lead to problems Alternatively if you want to keep the new name BlogEngine instead of the old BlogEngine NET you should edit the row in the aspnet Applications table where the application name is BlogEngine NET Change the value of the ApplicationName to BlogEngine and the LoweredApplicationName to blogengine Author BennyM Posted on 02 07 2008 Categories Computer Tags blogengine script sql update 2 Comments on Updated to BlogEngine 1 4 Updated BlogEngine NET scripts It was brought to my attention that the next release of BE will have some changes in the database scheme I ve compared the new script with the old one and the only changes at the moment of this writing are two new tables Since the tables both use varbinary max they are not compatible with MS SQL 2000 I ve changed the script to use image instead and briefly tested it Seems to work like a charm I ve also looked at the code which retrieves the values and I don t think there will be problems except hitting the maximum amount that can be stored in the image datatype which is unlikely So if you check out the code from codeplex and want to use it with a MS SQL 2000 database use this file BE SQL2000 Dev sql 15 07 kb If you download the latest

    Original URL path: http://blog.bennymichielsen.be/tag/script/ (2016-04-29)
    Open archived version from archive