Click here to Skip to main content
15,891,777 members
Home / Discussions / C#
   

C#

 
GeneralRe: Visual Studio sdk - context menu Pin
Martin#24-Jul-07 1:47
Martin#24-Jul-07 1:47 
GeneralRe: Visual Studio sdk - context menu Pin
ceejeeb24-Jul-07 2:01
ceejeeb24-Jul-07 2:01 
AnswerRe: Visual Studio sdk - context menu Pin
ceejeeb24-Jul-07 3:05
ceejeeb24-Jul-07 3:05 
Questionchanging the sattlite assembly after deployement Pin
Prajin24-Jul-07 1:01
Prajin24-Jul-07 1:01 
QuestionSetting background transparent for using shockwaveFlash control on .NET? Pin
Newgoldenman24-Jul-07 0:42
Newgoldenman24-Jul-07 0:42 
AnswerRe: Setting background transparent for using shockwaveFlash control on .NET? Pin
Newgoldenman25-Jul-07 5:03
Newgoldenman25-Jul-07 5:03 
GeneralRe: Setting background transparent for using shockwaveFlash control on .NET? Pin
Roey C5-Jul-10 8:05
Roey C5-Jul-10 8:05 
QuestionDynamic client site code for user modified db schemas Pin
AndrusM24-Jul-07 0:11
AndrusM24-Jul-07 0:11 
I'm planning to create WinForms ERP application which uses Entity classes for data access layer.

I created code generator which creates .cs files, separate file for every
database table.

My appl users can add fields to database tables after application is
deployed to create new fields for customer, invoice tables etc.

So I need to re-generate data-access layer if end user adds custom columns
to tables.
For this I need to create assembly from .cs files at runtime.

I'm planning to create class hierarchy containing 5 classes in 5 dll files
from which 2 (3 entity classes and 5 custom business logic) can be compiled
dynamically at customer sites:

1 EntityBase<t> - EntityBase.dll class. Base class for classes 2-5
2 ModelGenericBase<t> - ModelGenericBase.dll - common logic. Static dll,
deployed with application.
3 Entity classes: CustomerEntity, InvoiceEntity etc. -
ModelEntity.dll - this dll is generated dynamically from database tables.
4 Business logic - Business.dll - business logic, uses entity
classes. Static dll, deployed with application.
5 Customer, Invoice etc. class - ModelCustom.dll - contains custom
logic. Generated dynamically if on-site customization is used.


So I have 120 .cs files in single directory containig POCO s like:

Entity1.cs:

namespace Model {<br />
public class Entity1 {<br />
 string property1;<br />
<br />
 public virtual string Property1 {<br />
   get { return property1; }<br />
   set { property1 = value; }<br />
  }<br />
 }<br />
}

Entity2.cs:

namespace Model {<br />
public class Entity2 {<br />
 string property2;<br />
<br />
 public virtual string Property2 {<br />
   get { return property2; }<br />
   set { property2 = value; }<br />
  }<br />
 }<br />
}

I need to generate ModelEntity.dll assembly from those files from my application.

What do yuo think about this approach ?
Where to find sample code which compiles cs files and creates dll file ?


Andrus

QuestionHow to create shortcut? [modified] Pin
NanaAM23-Jul-07 23:52
NanaAM23-Jul-07 23:52 
QuestionWhere to place UI strings Pin
koger23-Jul-07 23:51
koger23-Jul-07 23:51 
AnswerRe: Where to place UI strings Pin
Colin Angus Mackay24-Jul-07 0:36
Colin Angus Mackay24-Jul-07 0:36 
GeneralRe: Where to place UI strings Pin
koger24-Jul-07 1:56
koger24-Jul-07 1:56 
GeneralRe: Where to place UI strings Pin
Colin Angus Mackay24-Jul-07 2:25
Colin Angus Mackay24-Jul-07 2:25 
QuestionChanging User interface language programmatically WinCE .Net CF(urgent) [modified] Pin
Jyoti.Patil23-Jul-07 22:57
Jyoti.Patil23-Jul-07 22:57 
AnswerRe: Changing User interface language programmatically(urgent) Pin
V.23-Jul-07 23:22
professionalV.23-Jul-07 23:22 
GeneralRe: Changing User interface language programmatically(urgent) Pin
Jyoti.Patil23-Jul-07 23:30
Jyoti.Patil23-Jul-07 23:30 
GeneralRe: Changing User interface language programmatically(urgent) Pin
V.24-Jul-07 0:15
professionalV.24-Jul-07 0:15 
GeneralRe: Changing User interface language programmatically(urgent) Pin
Jyoti.Patil24-Jul-07 0:28
Jyoti.Patil24-Jul-07 0:28 
GeneralRe: Changing User interface language programmatically(urgent) Pin
V.24-Jul-07 0:30
professionalV.24-Jul-07 0:30 
GeneralRe: Changing User interface language programmatically Pin
Jyoti.Patil9-Aug-07 5:00
Jyoti.Patil9-Aug-07 5:00 
GeneralRe: Changing User interface language programmatically Pin
V.9-Aug-07 20:47
professionalV.9-Aug-07 20:47 
QuestionLog IE downlaods Pin
renegadus23-Jul-07 22:43
renegadus23-Jul-07 22:43 
QuestionControlling GUI via text file ? Pin
keramik23-Jul-07 21:53
keramik23-Jul-07 21:53 
AnswerRe: Controlling GUI via text file ? Pin
JoeSharp23-Jul-07 22:00
JoeSharp23-Jul-07 22:00 
AnswerRe: Controlling GUI via text file ? Pin
Brady Kelly23-Jul-07 22:08
Brady Kelly23-Jul-07 22:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.