locked
Instantiate database model entities RRS feed

  • Question

  • User1043796333 posted

    Think that you have a string, let's say "Products"

    I want to create an instance of that entityso I do: Products products = new Products(); which works just fine

    But I want to pass the string as something that might could be instantiated for all entities in my datamodel.

    Let's say that instead of Products products = new Products(); I had

    var myentity = entity.EntitySet;
    myentity currententity = new myentity();

    Put it into a FormView. Is that possible at all? Of course, I'm talking about Dynamic Data not conventional ASP.Net

    Wednesday, October 19, 2011 5:33 PM

All replies

  • User1043796333 posted

    I have created a new thread because it might be possible that this can be achieved without reflection which will be great

    Wednesday, October 19, 2011 5:37 PM
  • User3866881 posted

    Hello sir:)

    Haven't seen you for ages... Hope my answer help you, I'm not willing to waste your time so don't be angry with me.

    This is an example for you to give you how to get and fetch the values and do auto-filling with the newly-created object:

    namespace MyTest
    {

        public class Food
        {
            public Food()
            {
        
             }
            [Key]
            public int Id { getset; }
            public string Name { getset; }
        }

      
        public class Program
        {
            public static object AutoFill(string assemblyName,string EntityNameparams object[]values)
            {
                //Initialize to create an object for an Entity Model
                object obj = Assembly.Load(assemblyName).CreateInstance(assemblyName + "." + EntityName);

                int index = 0;
                //Reflect to get the public properties and assign values
                foreach (PropertyInfo prop in obj.GetType().GetProperties())
                {
                    prop.SetValue(objvalues[index++],null);
                }
                return obj;
            }

            static void Main(string[] args)
            {
              //Example for this tesing!!!
                Food f = (Food)AutoFill("MyTest""Food"1"TestName");
                Console.WriteLine(f.Id);
                Console.WriteLine(f.Name);
            }
        }
    }
    NOW YOU CAN USE object "f" to do Attach and do updating,The reason why I'm using type conversion is to test only.
    Thx again
    Thursday, October 20, 2011 10:50 PM
  • User1043796333 posted

    It might seems that I’m angry, which I am, but not with you

    I can barely believe that Microsoft released a product which was almost instantaneously discontinued and overridden by MVC, as it seem from my own point of view

    I have also read several times that moderatos of Microsoft forums work in  a volunteer basis, which is not really good for them, for Microsoft, neither for us

    If Microsoft had paid people working for ASP.Net Dynamic Data then there won’t probably be so many discrepancies among Microsoft and its clients

    So I’d wouldn’t like to be seem as a “rude” guy but rather a dissatisfied customer with Microsoft in what’s regarding ASP.Net Dynamic Data

    I was told by one moderator that that the only person that could be interested in ASP.Net Dynamic Data in this world should be Stephen Naughton

    I did copy him on due time and many other ASP.Net Dynamic Data users about that. Such post was lately removed from my Inbox in that forum but evidence stays and supports my allegations on this

    Now, regarding your answer I can tell you that I had to do several things in order to make the example to work:

    Had to give the project the name MyTest

    Added System, System.Reflection and System.ComponentModel.DataAnnotations

    Added in registry REG_DWORD HKLM/Software/Microsot/Fusion Fusion!EnableLog] set to a value of [1]

    After that I run the example and I got MS-DOS a screen with 2 values:

    1
    TestName
    ….. press any key to continue ….

    This looks like a way for reading MetaData properties from your MetaData files, which would be great because I had already asked how to do that, so that’s very welcomed

    BUT

    I must add something: I’m not probably the smartest guy on earth so I have not been able to apply such concept to my ListDetails.aspx.cs file

    I need to do this in a real life Dynamic Data project not in a console application. Both environments are radically different

    It is impossible for you to create an example using Dynamic Data with real sample data (a data context used in your Global.asax flle, real entities?

    And most of all Real Instances of your converted strings into entities

    You probably know that Dynamic Data works based on templates so there is only own ListDetails page available for all of your entities, unless you decide to do some specific customization in which case my question wouldn’t probably make any sense because you’d already have the required instances of the instantiated needed object entities

    So, in real world ASP.Net Dynamic Data you must pass proper arguments to proper events. It is not the same working with a OnInserting event that with OnInserted event. And is not the same working with those events for a FormView than for a GridView than for a EntityDataSource control, isn’t it?

    So, I’m not mad when I say that is useless to gve an example using Console.WriteLine statements when those instructions doesn’t even apply or resemble an ASP.Net Dynamic Data application behavior

    So I’ll reformulate my question again: In the example below I need to create instances of “thisentity” and as I couldn’t I’ve been needed to use a switch statement as to do direct instantiations of the object.

    So this should be:

    thisentity selection = (thisentity)entry.Entity;
     
    instead of:
     
    a01acc_accountdets sela01 = (a01acc_accountdets)entry.Entity;
    m01mst_finacctypes selm01 = (m01mst_finacctypes)entry.Entity;
     
    etc 100 times more
     
     
    I might as well could have something like this:
     
    List< thisentity> selChangedStat = new List<thisentity>();
     
    Instead of:
     
    List<a01acc_accountdets> selChangedStat_a01acc = new List<a01acc_accountdets>();
    List<m01mst_finacctypes> selChangedStat_m01mst = new List<m01mst_finacctypes>();
     
    etc 100 times more
     
     

    What I have now looks like this.:

     Container.cs

            private void switchContainer(ObjectStateEntry entry, string entidad)
            {
                s1925Entities myEntities = new s1925Entities();
                var thisentity = entry.EntitySet.Name.ToString();
     
                switch (thisentity)
                {
                    case "a01acc_accountdets":
                        a01acc_accountdets sela01 = (a01acc_accountdets)entry.Entity;
    ;
                        myReviewa01 = (from r in myEntities.a01acc_accountdets
                                       where r.cod_accountdet == sela01.cod_accountdet
                                       select r).Single();
                        myReviewa01.active = "N";
                        selChangedStat_a01acc.Add(myReviewa01);
                        SavedChangest_a01acc +=
                         new EventHandler<SavedChangesEventArgs_a01acc>
                        (s1925Entities_SavedChangest_a01acc);
                        break;
                    case "m01mst_finacctypes":
                        m01mst_finacctypes selm01 = (m01mst_finacctypes)entry.Entity;
    ;
                        myReviewm01 = (from r in myEntities.m01mst_finacctypes
                                       where r.cod_finacctype == selm01.cod_finacctype
                                       select r).Single();
                        myReviewm01.active = "N";
                        selChangedStat_m01mst.Add(myReviewm01);
                        SavedChangest_m01mst += …… etc 100 more times
                         new EventHandler<SavedChangesEventArgs_m01mst>

     

    Friday, October 21, 2011 5:59 PM
  • User1043796333 posted

    Thanks anyway

    I knew this question wouldn't ever be answered

    Just wonder when are those 2 coming Dynamic Data books going to be released

     

     

    Hello sir:)

    Haven't seen you for ages... Hope my answer help you, I'm not willing to waste your time so don't be angry with me.

    This is an example for you to give you how to get and fetch the values and do auto-filling with the newly-created object:

    namespace MyTest
    {

        public class Food
        {
            public Food()
            {
        
             }
            [Key]
            public int Id { getset; }
            public string Name { getset; }
        }

      
        public class Program
        {
            public static object AutoFill(string assemblyName,string EntityNameparams object[]values)
            {
                //Initialize to create an object for an Entity Model
                object obj = Assembly.Load(assemblyName).CreateInstance(assemblyName + "." + EntityName);

                int index = 0;
                //Reflect to get the public properties and assign values
                foreach (PropertyInfo prop in obj.GetType().GetProperties())
                {
                    prop.SetValue(objvalues[index++],null);
                }
                return obj;
            }

            static void Main(string[] args)
            {
              //Example for this tesing!!!
                Food f = (Food)AutoFill("MyTest""Food"1"TestName");
                Console.WriteLine(f.Id);
                Console.WriteLine(f.Name);
            }
        }
    }
    NOW YOU CAN USE object "f" to do Attach and do updating,The reason why I'm using type conversion is to test only.
    Thx again

     

    Tuesday, October 25, 2011 7:21 PM
  • User3866881 posted

    Hello Topolov:)

    Sorry for being so late to give you reply... And I'm too busy these days...

    Now I've submitted your issue to Microsoft professional members to deeply analyze this.

    Hope they will help you.

    Thx again

    Tuesday, October 25, 2011 8:54 PM
  • User-330204900 posted

    Hi Topolov, I still don't have a deal yet :(

    Wednesday, October 26, 2011 7:31 AM
  • User1043796333 posted

    It seems that two things might e happening here:


    i) This issue matters only to me and no one else or
    ii) This is really a very profound and complex "issue"


    How can it be so hard for you to achieve instantiating something an object that has been previously defined as “dynamic” ?


    If the type “dynamic” exists is because the VS20120 compiler knows that is something that will be evaluated and defined at runtime so if I have a variable which is supposed to behave like one of the entities in my database model (.dmx file) then I could have as well a valid definition of the values which my variable can take at run time, isn’t it?

    How can it be possible that you can extract from your model all the interfaces  and cannot be able to “instantiate” any of them as arguments passed as strings of such names?

    I am surprised that something which seems rather trivial and simple couldn't had been answered yet by the very expert and smart developer people in Microsoft

    Regretable, no?

    Monday, November 7, 2011 12:47 PM
  • User1457047042 posted

    I have a similar situation. Answers will be very welcomed

    Monday, November 7, 2011 7:13 PM
  • User1957418580 posted

    Hello Topolov,

    I'm taking a look at this post and trying to understand what you are trying to accomplish.  I'm very far from an Entity Framework or Dynamic Data expert, but want to see if I can get a really good description of the issue you are having so that I can see if I can find someone here to help.  The best I can see is that the crux of your issue is that you cannot create an instance of an entity.  I know you don't want to talk about console apps, but if this cannot be done in a console application, it would never be able to be done in ASP .NET app either.  Can this simple line be done in a console application?  If not, then we need to find another way to accomplish your actual application goal.

    It seems that you do have some workarounds, but are unhappy that you have to go to such lengths.  If you would like to explain exactly what you are trying to do so that I can better understand, maybe that would help.  For my ease, could you just put it in terms of the AdventureWorks database, and explain to me exactly what your web page needs to do - please, first, just let me know what you are trying to accomplish without worrying about how it would work with the Entity Framework so that I can get a high view of your project need.

    Again, if you feel that you should be able to create an instance of an entity, can you verify that this can be done in a console application?  This forum would probably be best for that question:  http://social.msdn.microsoft.com/Forums/en-US/adodotnetentityframework/threads.  They would know EF the best.  I realize ASP .NET Dynamic Data is very different, and it's going to be more limited because we have to worry about rendering browser-friendly html, and keep data information from page to page without having that constant connection to the server, but unless I'm reading this wrong, your basic question (creating an instance of an Entity) applies in both console and ASP .NET arenas.

     

    Wednesday, November 9, 2011 8:42 AM
  • User1043796333 posted

    I don’t think this questions makes sense in any other environment but Dynamic Data

    Why? Simple: Dynamic Data scaffolding’s way of working : Templates

    Dynamic Data will behave much more different in any other ASP.Net conventional way of doing things because it uses URL substitution in order to achieve desired result: show a grid or a form By doing it, Dynamic Data uses only 4 pages : List, Details, Edit and ListDetails It uses those 4 basic templates for all entities contained in your database model file (let’s say YourModel.edmx) So everything works just fine unless you have to make “customization”

    In my case, let’s say I have the Northwind database with its 11 or 12 tables in my database model .edmx

    Say that I need to customize this: I have added to all 12 entities in my model with 2 additional audit control fields: done_by and date_done_by As I have these 2 fields in all of my tables, I just need to modify the OnInserting event of my DataSource in my ListDetails.aspx page in order to pass theses two values and make proper recording of this data in the database tables

    At this point, I need to create an instance of the current table (the one belonging to the entity I’m currently working with) and pass the data to it

    So I want to write this piece of code only “once” and not 12 times

    Obviously I have the string representing my current table …. So …. I need to create an instance of the entity represented by that string Simple, isn’t it?

    Friday, November 11, 2011 1:29 PM
  • User-330204900 posted

    I just need to modify the OnInserting event of my DataSource in my ListDetails.aspx page in order to pass theses two values and make proper recording of this data in the database tables

    Hi Topolov, this is not the correct place to do this you should do this in your data model then no matter which page is used custom or template then your data will be updated. the code behind is not the place for this kind of business logic see:

    Implementing Audit Trail using Entity Framework - Part 1

    Implementing Audit Trail using Entity Framework - Part 2

    Saturday, November 12, 2011 8:42 AM
  • User1043796333 posted

    I don´t think that this is about being right or wrong but ilustrating an scenario in which my question make sense. It is much better undetanadable doing that in that place that in a Console application

    On the other hand, Yacine Khamal will be probably wrong on what he teaches about Dynamic Data because the example I had given here belongs to one of is lectures at Pluralsight

    I just need to know how to do the instantiation of a string represg an entity. I don't really mind where or how but that the example works in Dynamic Data

    Customized solutions is not the best apporach for Dynamic Data, isn't it?

    Saturday, November 12, 2011 7:41 PM
  • User-330204900 posted

    Well I would say that that is the simplistic way of doing it, but to be DRY you would always put your auditing code in the data model. DRY was what you were asking for in the quote. As for instantiating an entity from a string, I would say you are looking for the new model binding feature that is comming in .Net 4.5 one of the new DD features :) For now I can't think of a good reason to do this in a generic way so I would do i long hand and cast each string item to the entity's property type and build the entity that way. I think there is a clever way of doing this in the N41 DynamicData Extender project.

    Sunday, November 13, 2011 5:43 AM
  • User1043796333 posted

    Steve, this is just a theorethical situation not a real life one

    I have put into context something more important than just literal facts: Dynamic Data way of doing things is quite different from Console applications so please don't take me wrong but we should be pointing out ina  direction of resolving my question and not formulating new ones

    If this is the right place or not is out of the question too. I need a real life scenario so I can get an answer

    Jacine said in one his lectures at Pluralsight that some business rules should be applied in that right spot that you disagree with but he certainly did it and posted examples 

    The question again is this: can my question be answered with an example or not?

    Why is so hard for you guys to give simple answers like: I don't know, I don't want to disclose that to you, or you don't deserve to be called a programmer asking questions like this, why don't you get a training on C# firts before trying to develope ASP.Net applications and so on

    But when you give non-answers answers is just frustrating. Makes me feel like crying

    There must be a way of doing it, isn' it?

    It seemed to me that using "dynamic" approach and reflection would help but all provided examples doesn't work for my case

    I have to mention again one thing: If there is no answer, no support for DD, no documents, no useful samples, no answers, no DD people answering DD stuff, etc. then: what are we doing here using DD?

    But you have said many times that DD will go on and taht is not dead, so I believe you

    But, again, please provide examples and not just wording, please

    P.S.: N41 link is dead

    Monday, November 14, 2011 11:34 AM
  • User-330204900 posted

    Hi Topolov

    It seemed to me that using "dynamic" apporach and reflection would help but all provided examples doesn't work for my case

    there probably is a way to do what you want but I don't think I have the answer, maybe I don't understand what you want to achive? I always say please descibe what you want to acive not the way you want to achive it with DD there are many wayt to do things usually different from standard ASP.Net Web Forms.

    I have to mention again one thing: If there is no answer, no support for DD, no documents, no useful samples, no answers, no DD people answering DD stuff, etc. then: what are we doing here using DD?

    As I have not gotten a book deal (I just get no reply from O'Rielly) I am trying to work something out I'll keep you all posted onceI have something to tell. and as to no people are answering stuff that may be becuase the forum has quietend down a little but things will pick up with the new bits comming in ASP.Net 4.5

    And I am still here answering and so is Decker.

    Monday, November 14, 2011 11:47 AM
  • User1043796333 posted

    Thanks for all. I'm just frustraed with re-writing code 1000 times for "customizing" in any case as you have just described

    I know there must be a way of writing such instantiation just once

    I still don't understand why you don't understand what I'm asking: If I have a string which represents an entity then how can I create an instance of such string in my OnInserting event of my FormView DataSource control so it can be used for any of the entities in my database model .edmx file?

    You see, a string doesn't have the properties that the instance of an entity has so I need an instance of "current entity" to do my job NOT a string

    Is not sending a rocket to the moon, is it?

    Monday, November 14, 2011 11:52 AM
  • User-330204900 posted

    Can you answer why you want to do this?

    Monday, November 14, 2011 12:39 PM
  • User1043796333 posted

    Ok.  Below you can find part of a real life example, Jamal's way put into practice.

    I have a database with almost 200 tables so I have to do this 200 times

    List<a01acc_accountdets> selChangedStat_a01acc = new List<a01acc_accountdets>();
    List<m01mst_finacctypes> selChangedStat_m01mst = new List<m01mst_finacctypes>();
    Instead of:

    List< thisentity> selChangedStat = new List<thisentity>();

    I have also this case in which thisentity must be instantiated 200 times too instead of a single time:

     Container.cs

            private void switchContainer(ObjectStateEntry entry, string entidad)
            {
                s1925Entities myEntities = new s1925Entities();
                var thisentity = entry.EntitySet.Name.ToString();
     
                switch (thisentity)
                {
                    case "a01acc_accountdets":
                        a01acc_accountdets sela01 = (a01acc_accountdets)entry.Entity;
    ;
                        myReviewa01 = (from r in myEntities.a01acc_accountdets
                                       where r.cod_accountdet == sela01.cod_accountdet
                                       select r).Single();
                        myReviewa01.active = "N";
                        selChangedStat_a01acc.Add(myReviewa01);
                        SavedChangest_a01acc +=
                         new EventHandler<SavedChangesEventArgs_a01acc>
                        (s1925Entities_SavedChangest_a01acc);
                        break;
                    case "m01mst_finacctypes":
                        m01mst_finacctypes selm01 = (m01mst_finacctypes)entry.Entity;
    ;
                        myReviewm01 = (from r in myEntities.m01mst_finacctypes
                                       where r.cod_finacctype == selm01.cod_finacctype
                                       select r).Single();
                        myReviewm01.active = "N";
                        selChangedStat_m01mst.Add(myReviewm01);
                        SavedChangest_m01mst += new EventHandler<SavedChangesEventArgs_m01mst>

    So I pretend to avoid writing repetitive code. I could as well avoid the switch statement 

    Ok?

    Monday, November 14, 2011 2:30 PM
  • User-330204900 posted

    Sorry Topolov, I still am none the wiser as to what you are trying to achive, all you have done is give an example of what you want to do.

    Thursday, November 17, 2011 8:30 AM
  • User1043796333 posted

    sorry

    Thursday, November 17, 2011 12:22 PM
  • User1043796333 posted

    To: Mr. cts-mgraham

    From my point of view and having asked this very same question under different threads and having done it for a very extended period of time I come to conclude that most people asking if Dynamic Data is dead are simply right

    Outrageous could be a good word to describe the way in which Microsoft contributors behave when answering Dynamic Data questions

    I can´t believe that someone, proffessionally enough, had just answered "We don't know" or something like that but giving no answer at all seems to me like an ostrich hidding its head in the ground

    I'm pretty sure that the answer to this question is sometnig absoluttely trivial for you guys using reflection but truth is that you just don't care

    I rather think that than conclude that you don't know which could be simply terrible for the developers community all around the world

    See this headline: "Microsoft doesn't know how to program" ????

    Outrageous, isn't it?

    Saturday, November 26, 2011 12:16 PM
  • User-330204900 posted

    From my point of view and having asked this very same question under different threads and having done it for a very extended period of time I come to conclude that most people asking if Dynamic Data is dead are simply right

    Sorry Topolov, I don't know whether you actually believe this or not but you are defiantly wrong!

    As I have said time and again there are new bits in .Net 4.5 specifically for DD.

    And as for the question you are askign in this thread, as I have asked several times tell me what you want to achive not how you want to acive it and I will be able to help you.

    Saturday, November 26, 2011 1:21 PM
  • User1043796333 posted

    Ok. Now I feel obligued

    I'll re-write a recent powst I just erased but which seems worthwhile

    I have to admit that my way of writing my ideas in the english language might not be as good as I expected

    I say this because the example you've asked for is already there

    I have a variable whose name is "thisentity" so I need to use an instance of that string in my OnInserting event of a FormView's datasource control so I can create an instance of the type List<thsientity> and then create another instance of that entity as to create a Linq query statement which will avoid me to write a switch construction that I'm currently using as to determine what entity am currently working with

    So I don't understand whay so much round and round around such a simple question: How can I create an instance (in ASP.Net Dynamic Data) of an entity of a string representing the entity currently selected for me to work with from the Dynamic Data standadrd scaffolded entities menu

    How is that I am not clear? I need to create an instance of a string representing such entity

    If you've written VS2010 ASP.Net Dynamic Data C# code you've already realized that when you try to use a string representing an entity of your .edmx file then intellisense ask you to do the "casting" of that string to an entity

    It asks you to "use" your model.entity context and then the string is transformed from something "black" to somethintg "green" which has the properties not of a string but of the entity you've just casted to

    I feel like the stupidiest person in the world when you make me write like this 

    You better say "I don't want to answer" than fooling me 

    OUTRAGEOUSLY LAUGHABLE  : "paid support options" Cool Jajaja

    Hello Topolov,

    I'm very sorry that this has gotten you so upset, but I just don't know how to help you. 

    1) I understand that you are upset

    2) I understand that you want to create an instance of an entity (I'm afraid, as you've found out, this is not possible with the current incarnation of this particular object)

    3) I understand that you have a workaround - as cumbersome as you feel that it is.  If I am wrong about this - please tell us what you are trying to accomplish - not HOW you want to accomplish it, and maybe we can think of something that would be of some use.

    From the Dynamic Data site:  "ASP.NET Dynamic Data provides a framework that enables you to quickly build a functional data-driven application, based on a LINQ to SQL or Entity Framework data model. It also adds great flexibility and functionality to the DetailsView,FormViewGridView, and ListView controls in the form of smart validation and the ability to easily change the display of these controls using templates."

    I remember even as early as Visual InterDev 1.0 (1997!) with a DataForm wizard that some people loved and some were very frustrated by it.  The people who loved it, loved it because it was very easy to accomplish great functionality very quickly, and the people who were frustrated by it was because it was very generic and extremely difficult to customize and extend.  Since then, I think there have been great strides in the ultimate goal of making things easier to use, easier to customize and to extend, but there are still some limitations that you will have to use some ingenuity and brute force programming to accomplish.  I think you are just at that place right now, and I do understand the frustration, but this is a forum question, and I just don't have the answer you want. 

    Your wish is noted, but I can't say for sure if/when or how this might be addressed in a future incarnation.  If you wish to push for this, and have a business need, you can create a case with us.  Please visit the below link to see the various paid support options that are available to better meet your needs. http://support.microsoft.com/default.aspx?id=fh;en-us;offerprophone

     

    You should be paying me Microsoft for having me engaged in this nightmare unsupported dead product

    Also, contributors should be experts on the field and they also should be paid for providing support 

    This is a rea life situation forum not a place for entertaining people or for having people completing their social hours required for graduation

    Monday, November 28, 2011 1:57 PM
  • User1957418580 posted

    Hello Topolov,

    I'm very sorry that this has gotten you so upset, but I just don't know how to help you. 

    1) I understand that you are upset

    2) I understand that you want to create an instance of an entity (I'm afraid, as you've found out, this is not possible with the current incarnation of this particular object)

    3) I understand that you have a workaround - as cumbersome as you feel that it is.  If I am wrong about this - please tell us what you are trying to accomplish - not HOW you want to accomplish it, and maybe we can think of something that would be of some use.

    From the Dynamic Data site:  "ASP.NET Dynamic Data provides a framework that enables you to quickly build a functional data-driven application, based on a LINQ to SQL or Entity Framework data model. It also adds great flexibility and functionality to the DetailsView, FormView, GridView, and ListView controls in the form of smart validation and the ability to easily change the display of these controls using templates."

    I remember even as early as Visual InterDev 1.0 (1997!) with a DataForm wizard that some people loved and some were very frustrated by it.  The people who loved it, loved it because it was very easy to accomplish great functionality very quickly, and the people who were frustrated by it was because it was very generic and extremely difficult to customize and extend.  Since then, I think there have been great strides in the ultimate goal of making things easier to use, easier to customize and to extend, but there are still some limitations that you will have to use some ingenuity and brute force programming to accomplish.  I think you are just at that place right now, and I do understand the frustration, but this is a forum question, and I just don't have the answer you want. 

    Your wish is noted, but I can't say for sure if/when or how this might be addressed in a future incarnation.  If you wish to push for this, and have a business need, you can create a case with us.  Please visit the below link to see the various paid support options that are available to better meet your needs. http://support.microsoft.com/default.aspx?id=fh;en-us;offerprophone

     

    Tuesday, November 29, 2011 7:40 AM
  • User1043796333 posted

    To  cts-mgraham

    Ok. I have overcome my fears and now I'm ready to answer back to you<o:p></o:p>

    You can´t answer like that to one of your customers<o:p></o:p>

    Is like if you were saying: Why don't you use Java instead of C# because they already have a freeware solution because ousr are always paid and expensive<o:p></o:p>

    You must be kidding me <o:p></o:p>

    You rather copy your answer to Mr. Bill Gates tyo see what he thinks of you as a professional representing its firm<o:p></o:p>

    If you were capable of "reading" what I have written to you then you should be concerned in not having enough background to provide an answer<o:p></o:p>

    It is well known that (and you said officially it not me) that Stephen Naughton is the only person in this world that is taking seriously Dynamic Data, then you should be probably paying him for doing the job you're not capable of<o:p></o:p>

    Naughton will obviously decline to say anything against you guys in this forum and I understand him but that is nothing more than a fake humbleness <o:p></o:p>

    Your attitude in trying to solve this issue is simply disappointing<o:p></o:p>

    Friday, December 2, 2011 12:56 PM
  • User1043796333 posted

    Why is this topic so hard to answer?

    Are you mad at me just because I have the courage of showing my dissapointment?

    Are we users allowed to ask for a little respect?

    I am not bulling neither am I kidding when I say that you guys should behave more professionally when answering things on Dynamic Data

    It is not my fault that someone has assigned people to answer questions here with an obvious lack of knowledge on the subject

    I AM MAD, yes I am but not without a good reason

    I am not even sure that this issue might answered even by means of paying. I have my doubts

    You should be ashamed of working like this way. You really should

    Friday, December 9, 2011 8:24 PM
  • User-330204900 posted

    Sorry Topolov, I have read your posts you still seem to describing how you want to do waht you want rather than what you want to achive and until you do that I can't help. EF does not seem to support the method you want to employ maybe it's time you described what it is you want to achive, what is the business rule/action you want here?

    Saturday, December 10, 2011 8:57 AM
  • User1043796333 posted

    I am not mad at you Naughton

    I am mad probably with myself when I have to deal with some attitude of people answering on behalf of Microsoft here

    Hello Topolov:)

    Sorry for being so late to give you reply... And I'm too busy these days...

    Now I've submitted your issue to Microsoft professional members to deeply analyze this.

    Hope they will help you.

    Thx again

    What would you expect of someone waiting an answer since 10/26/2011 1:54:40 AM in which such post was submitted? After such a long time I'd ask myself: where is the answer from that people? Or should be simply understood that they don't care or that they don't know

    You ask Steve for what do I want to achieve:

    Ok

    If I have a new ASP.Net Dynamic data project, EF type, in which I have a .edmx context then I'd like to know how to create an instance of an object which I know at any given time because I have a string which tells me what entity I am working with at that time

    That means that I have already selected from the main menu one of the entities shown there

    At this point, ASP.Net knows what to do and how to manage data related with such entity

    I'd like to do the same, anytime that I have to deal with a FormView in which I'd like to pass my own set of data belonging to such entity

    Let's say that I want to modify a date, or pass data regarding the user that performed such action, etc.

    ASP.Net Dynamic Data performs all of this in its background at a very specific time so I need to "pinch" that set of data before it is submitted to the database so my own data could be included as well

    Is that so hard to do or understand? Seriously? Should I pay? Who knopw how to do this on a paid basis? you? them? who?

     

    Saturday, December 10, 2011 12:34 PM
  • User3866881 posted

    I am not mad at you Naughton

    I am mad probably with myself when I have to deal with some attitude of people answering on behalf of Microsoft here

    Hello Topolov:)

    Sorry for being so late to give you reply... And I'm too busy these days...

    Now I've submitted your issue to Microsoft professional members to deeply analyze this.

    Hope they will help you.

    Thx again

    What would you expect of someone waiting an answer since 10/26/2011 1:54:40 AM in which such post was submitted? After such a long time I'd ask myself: where is the answer from that people? Or should be simply understood that they don't care or that they don't know

    You ask Steve for what do I want to achieve:

    Ok

    If I have a new ASP.Net Dynamic data project, EF type, in which I have a .edmx context then I'd like to know how to create an instance of an object which I know at any given time because I have a string which tells me what entity I am working with at that time

    That means that I have already selected from the main menu one of the entities shown there

    At this point, ASP.Net knows what to do and how to manage data related with such entity

    I'd like to do the same, anytime that I have to deal with a FormView in which I'd like to pass my own set of data belonging to such entity

    Let's say that I want to modify a date, or pass data regarding the user that performed such action, etc.

    ASP.Net Dynamic Data performs all of this in its background at a very specific time so I need to "pinch" that set of data before it is submitted to the database so my own data could be included as well

    Is that so hard to do or understand? Seriously? Should I pay? Who knopw how to do this on a paid basis? you? them? who?

    Hello:)

    Very sorry to hear that,and to be honest——I've tried my best to offer a solution to you and I'm afraid that you are not satisfied with me……So I escalated (in Microsoft,if some support engineer cannot solve problems,we will send emails inner to find a cts to help you……),don't be very angry and no need of madding yourself,perhaps we don't quite understand or just misunderstand your meaning。Or maybe your problem is too complicated (though it looks easy)……. So a deep analyze is a need。 I think so。

    For paid support,you can try to:

    http://support.microsoft.com/ph/6245

    Please read the readme or introduction there to avoid mis-controlling。

    Hope it helps!

    Sunday, December 11, 2011 12:55 AM
  • User1457047042 posted

    I am facing more or less the same situation

    This is something that we developers need in a every day situation

    I need that resource too. Please don't say it doesn't exist adn that it should be paid

    Sounds ridiculous to me asking for money

    Wednesday, December 14, 2011 9:51 AM
  • User-330204900 posted

    Hi Lyl2011, can you explain what you are trying to achieve please rather that what you doing and having an issue with DD very often present alternate ways of achieving the same goals.

    Wednesday, December 14, 2011 9:57 AM
  • User-478436283 posted

    Sir: Probably you are not of the simple coding writing style but there are many of us that surely are of that kind.

    If I have a program which allow me to work based on templates rather than customizing pages for almost all of my tables then I will probaly choose to work in a templated scenarion than a customized one.

    Having said that, I should add that if you are programming some routine of code in the usual manner, inheriting a little of that old fashioned top down approach, then you will find yourself doing some calulations in the middle of your code, invoking isntantiated entities as to query them etc.

    That's what we normally do, no?

    So if you want to achieve this way of working while programming in dynamic data then you will need to have instances available of any of your tables at any given time

    Let say that you want to filter a form depending on the profile of the user logged. Let say that you want to pass some default data to the current set of data. Let say that you want to do some kind of filtering depending on some general conditions which define part of your logic strategy (call it a behavioral Use Case). In all of these cases you will need to have available isnstances of any of your tables

    So you do not want to do some customization to your pages but you would ratther do a little ode customization and you will have what you wnat to achieve without having created an additional custom page

    All examples provided for answering these questions try to put that issue apart; which is wrong

    This question is so simple to understand if you only were to give an answer based on a dynamic data environment and not any otther one

    This is something that is probably so silly that is hard for you to understand

    You are probably trying to find some kind of scientific solution. You seem like you are in the space shuttle while we are stranded here on earth

    I say it should be so simple because you can achieve this any moment that you want with the exception that VS2010 tries to obligue you to create custom call to an entity rather than allowing you to use the string as a dynamic parameter

    Let say that you have an entity whose name is Products

    What do you need to create an instance of that table?

    Easy. Piece of cake: you simply write the name of the entity and VS2010 will show a visual component which invites you to use your data base model context and after that your string is cast into an object which represents an entity and is no longer a string

    That is a customization that you do not want because it will only work for a single entity and will not work for all other entities in your model

    So the question shown here has a real value because they are asking you to disclose the code that VS2010 uses to do the cast BUT in a way which will allow the programmer to use the same piece of code not just for one entity but for all of them

    Wish you will understand

    Wednesday, December 14, 2011 1:54 PM
  • User-478436283 posted

    Sir: I will say it this way

    If you need to do calculations then you need a calculator

    If you need to cook an egg you need a frying pan

    When you need to dig a hole you use a shovel

    What would you need to work with instances of database data in an ASP.Net Dynamic Data program? you must probably need an "instantiator", don't you?

    Thursday, December 15, 2011 11:12 AM
  • User1043796333 posted

    You'll never find an answer on this

    Friday, December 16, 2011 7:07 PM
  • User-330204900 posted

    There is always an answer if you are willing to post the question in a way that does not presuppose the way of the solution there are many way to skin a cat as the old proverbe says :)

    Saturday, December 17, 2011 2:28 PM
  • User1043796333 posted

    I'd like to see how do you "skin" this cat at least once

    Is un-understandable that such a simple question can't be properly understood

    At any given time in your development, in Dynamic Data with C#, you want to have available an instance of the current entity you're working with so you can query such table and make some CRUDing with it

    So, let's say I have chosen Products from my menu: how do I do to pass some additional data of some additional columns I have added to such entity as to fulfill my own business rules (my client rules, his way)

    I just need to have Products available to me but I don't want to customize a page as to have it available for me. I want to use the very same page all other entities use

    Is that so hard to understand or something so hard to achieve?

    What should I do when instaed of Products I have chosen "sections" or "someothertable" and I want t do some CRUD operations with such netities?

    I know I can customize but I don't wnat to do that. I want to find a way of allowing me to have an instance available of the current entity I'm working with (or any other table or view from my database model)

    Dynamic Data does all of this for current entity in its own wy I want to do it MY WAY

    Sinatra's way

    Monday, December 26, 2011 5:53 PM
  • User-330204900 posted

    At any given time in your development, in Dynamic Data with C#, you want to have available an instance of the current entity you're working with so you can query such table and make some CRUDing with it

    I do this in the data model, the correct place for this observing the DRY principal.

    I just need to have Products available to me but I don't want to customize a page as to have it available for me. I want to use the very same page all other entities use

    Doing this kind of thing int he data model means I never have to have a custom page.

    Is that so hard to understand or something so hard to achieve?

    no it's not I always do it in the data model.

    Monday, December 26, 2011 6:31 PM
  • User1043796333 posted

    You understand things your way

    I'm asking omething rather different from what you're saying

    If I have this

    {
        protected void Page_Load(object sender, EventArgs e)
        {
            var table = DynamicDataRouteHandler.GetRequestMetaTable(Context);

    then table has all things what I need. Onl,y problem is that I need to have tables available in OnSavingChanges event not in Page_Load

    I can query my current entity because table is an instance of my current entity

    but I can't use that piece of code in the p´lace I'm saying to you

    I don't see why you have to bring here some talking about the data model

    Sounds silly
    Thursday, December 29, 2011 6:12 PM
  • User-330204900 posted

    var table = DynamicDataRouteHandler.GetRequestMetaTable(Context);

    That only get the metatabe not the collection or entity you currently have sorry.

    Saturday, December 31, 2011 10:52 AM
  • User1043796333 posted

    First of all : Happy new year

    I must disagree with you.

    In "table" I can see while dbugging al properties and database content I'd like to have while in OnSavingChanges event

    As I told you before, I'm cybering (renting a PC as to have internet acces. Mine has been cut off for lack of payment) so I have no way of telling you exactly where I can see that but for sure I have seen it  and the data is tehre

    Sadly after 40 submissions there is and probably there won't be an answer to this

    Sadly I have to create switch statements as to instantaite all of my database model entities in my programs

    God bless you and your family

    I'm mad not at you but with my lack of knowledge and capabilities of overcoming on this issue

    I'd like to have a copy (bought from you) of your bok

    I'd like to learn deeper and if you decide to sell your book to all of us ( peopel interested) you could make a good amount of money before MS closes development on Dynamic Data

    They have said it:m you are the only person in this world, plus me, interested in DD plus all other 2,00 people in this forums

    2,000 copies sold will make a good profit for you, doesn't it?

    Saturday, December 31, 2011 11:21 AM
  • User-330204900 posted

    In "table" I can see while dbugging al properties and database content I'd like to have while in OnSavingChanges event

    yes you are correct table is perhaps the wrong name maybe entity.

    I think now I see where you are going and you will need to use a lot of reflection to make this generic, the switch statement will be easier, I will still do this in the model though and not the page.

    Saturday, December 31, 2011 6:01 PM
  • User-1488931086 posted

    Topolov

    In "table" I can see while dbugging al properties and database content I'd like to have while in OnSavingChanges event

    yes you are correct table is perhaps the wrong name maybe entity.

    I think now I see where you are going and you will need to use a lot of reflection to make this generic, the switch statement will be easier, I will still do this in the model though and not the page.

    Agree with the MVP's idea,All in all,you've still converted to code sample of reflection---Just like what Decker Dong's idea as well as other Microsoft employees' ideas(Perhaps their ideas are not fit for you very much) But plz don't be so angry and in fact no one wants to cheat you, they are without any reasons to cheat you.

    Remeber it that once your question is asked and many of us tried our best to save you from the difficult, you are not satisfiled with all of us at all.... If that so, you should turn back to your own way to check whether it REALLY OK or not.

    Maybe you should change a way... We are free of charge to help you, no reasons to fool you, don't be so annoyed! Microsoft's employees---I think they only want to share sample codes or try their best to make you confortable.... They are not willing to challenge you...

    To be honest.... Topolve, you are a little sentimental

    In the end, HAPPY NEW YEAR!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    Monday, January 2, 2012 4:20 AM
  • User-330204900 posted

    Yes happy new year to you you too TimoYang :) and to you Topolov may your situation improve and may you prosper this year.

    Monday, January 2, 2012 4:31 AM
  • User1043796333 posted

    Topolov

    In "table" I can see while dbugging al properties and database content I'd like to have while in OnSavingChanges event

    yes you are correct table is perhaps the wrong name maybe entity.

    I think now I see where you are going and you will need to use a lot of reflection to make this generic, the switch statement will be easier, I will still do this in the model though and not the page.

    Agree with the MVP's idea,All in all,you've still converted to code sample of reflection---Just like what Decker Dong's idea as well as other Microsoft employees' ideas(Perhaps their ideas are not fit for you very much) But plz don't be so angry and in fact no one wants to cheat you, they are without any reasons to cheat you.

    Remeber it that once your question is asked and many of us tried our best to save you from the difficult, you are not satisfiled with all of us at all.... If that so, you should turn back to your own way to check whether it REALLY OK or not.

    Maybe you should change a way... We are free of charge to help you, no reasons to fool you, don't be so annoyed! Microsoft's employees---I think they only want to share sample codes or try their best to make you confortable.... They are not willing to challenge you...

    To be honest.... Topolve, you are a little sentimental

    In the end, HAPPY NEW YEAR!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    SORRY BUT YOU DON'T GET IT

    This forum is a Microsoft's support place not a place for beginners or amateurs for doing some kind of volunteer job. Isn't also a church location where you g asking for charity

    VS2010 Ultimate is not a cheap tool. Neither it was 2008, 2005 no 2003

    Having said that, it must be a commitment from the manufacturer in providing outstanding support for its products

    BUT WHAT IS WORTS IS: that even accepting things the way they are: freelancers providing support, then it would be AT LEAST EXPECTED having in each forum people who knows extensivelly all tips and tricks of the product they are suppoerting

    Is like saying that if I am studying Gravitational laws I'd like and expect Microsoft having Mr. Newton in its team or having Mr. Einstein if the forum were on relativity theory. Won't you expect this to be that way?

    Or you rather hace Joe Lala and John Doe working for you? which won't be bad if they knew but what if they don't know

    I'M CLOSING WITH THIS ARGUMENT:

    If you are providing advice or support to ASP.Net MVC you rather know something about it and not about anything else that is irrelevant for an MVC programmer

    So if you support SQL Server I'd expect to have an expert on that and not Oracle or MySql

    If you support C# then won't provide Visual Basic samples

    Of course, if you're working with ASP.Net Dynamic Data then PLEASE don't provide irrelevant examples using Console applications !

    THEY ARE 2 DIFFERENT THINGS, c'mon

    Wednesday, January 4, 2012 11:55 AM
  • User-330204900 posted

    SORRY BUT YOU DON'T GET IT

    This forum is a Microsoft's support place not a place for beginners or amateurs for doing some kind of volunteer job. Isn't also a church location where you g asking for charity

    Actually it's run by the community not Microsoft. so it is a place for armature and beginners doing volunteer work :) if you want Microsoft Support you have to pay for it.

    Wednesday, January 4, 2012 4:41 PM
  • User-1488931086 posted

    Hello Toplov again:)

    Sorry---We have no need to argue with each other.... Hope next time you can still come here more to have chats with us...

    Community is where we go and get-together.

    Thursday, January 5, 2012 2:27 AM
  • User1043796333 posted

    On the other hand, sorry if someone feels uncomfortable with my way of saying things but what I have said stands in most of my arguments

    Having said that, I must add that if you are a person working to provide support to other people, even a freelancer of a non-paid basis community, then you can't afford giving advice on something you don't know

    If you want to pray you rather know the scriptures before opening your mouth, won't you?

    What I have said about Dynamic Data support is nothing against any freelancer, thing that I didn know until Naughton's answer

    I am mad at Microsoft because it started working Dynamic Data back to Paulita times with Blinq. Since then until now, the product was supported by a bunch of good videos which were rapidly dismissed as obsolete because of the new framework releaes. Later on Dynamic Data was officially (even tough not said) superseeded by MVC

    So it seems that (this was told to me by you moderators) Naughton is the only person in the world interested in Dynamic Data. What about us that has been using this tool for more than 4 years. We don count? Our needs doesn't concern to anyone? I'm talking about Microsoft here

    It is simply outrageous that the official ASP.Net website offers as Tutorials something that comes from 2004

    DataSets way of modelling has been changed by the EF framework, hasn't it?

    Why does Microsoft offers those training based on 2.0 framework when thay have already delivered 4.5?

    YOU CAN'T HIDE MY TRUTH GUYS. You can argue whatever you want that you are not paid, freelancers, bla, bla, bla

    Truth is Dynamic Data IS NOT supported at all. Even by all of you that don't have the minor clue about it


    To Naughton I ca say that if he had a list of people buying his book, let's say 2,000 guys in the world, selling it at a $50 each he would easily make 100,000 bucks. Will he get that from a press?

    Start selling your book right now. You can wait to deliver it until you have already paid via credit card the 2,000 of us waiting for your release

    It will be a safe business selling it and having it on hold until you reach 2,000 paid orders. Wish I had that book to make this business

    Friday, January 6, 2012 12:49 PM
  • User1043796333 posted

    I'll ask you:

    Are you capable of doing this instantiation on a paid basis?

    If you are freelancers running the forums why don't you promote your proffessionl paid time as to resolve issues?

    That'd be more nice, proffessional and true if instead of reffering us to aplace were noone knows how to do things then why on't you promote openly yourselves?

    I must say that I don't think my issue can be solved even in a paid basis

    Or should I understand that SOME of those non-answer answers are a trick of some guys for sellingthei knowledge?

    I am not talking about Naughton, Hunter, Oleg Sich and many more and many others that have shared in their own blogs many things undisclosed before by the manufacturer

    Understand me. What I'm saying is that people here shoulkd be more serious on Dynamic Data (and nothing else)

    There are other forums for all answer on all other technologies, aren't there?

    Friday, January 6, 2012 1:05 PM
  • User-330204900 posted

    If you are freelancers running the forums why don't you promote your professional paid time as to resolve issues?

    BECAUSE this is for the community by the community. We don't sell our services here, that's not to say I havent had business from uses whom I have helped here. But that is not why I and may other do it, we like to help out or show off depending how you look at it Laughing

    Saturday, January 7, 2012 6:12 AM
  • User-330204900 posted

    I must say that I don't think my issue can be solved even in a paid basis
    I still don't understand what you want to achieve yet...

    Understand me. What I'm saying is that people here should be more serious on Dynamic Data (and nothing else)
    I am serious about Dynamic Data, I am going to have an open source project soon with all my samples available in one place integrated into a single project as a project template and as NuGet packages. So I think I am serious. As for Microsoft they are working hard on the next version of ASP.Net which includes enhancements for Dynamic Data Scott Gutherie has blogged about these recently.

     

    Saturday, January 7, 2012 6:17 AM
  • User-1488931086 posted

    I must say that I don't think my issue can be solved even in a paid basis
    I still don't understand what you want to achieve yet...

    Hi toplov, you are very unfriendly to us, since you think Microsoft's products are bad and you are of despite of these products... WHY DON'T YOU ABADON THESE THINGS? NO ONE IS FORCING YOU TO CONTINUE USING THEM.... YOU ARE OF NO REASONS AT ALL OF MAKING COMPLIAINS OF ALL THE MEMBERS HERE WHO ARE WILLING TO HELP YOU.....

    In fact, All the members who are here, as what I said above, they are willing help you.

    MVP (Steve) is a REALLY kind and nice person who helps you again and again without hesitations...

    Microsoft employees are still continuing helping you, but you ARE ALWAYS not satisfied with them, And none of us can understand you!

    So they told you about the paid address url, and you rejected it directly and spoke rudely....

    What are you going to do now??? Perhaps we cannot understand you at all.... BUT TO REMEMBER, IF YOU ARE ALWAYS MAKING US WORRIED AND CRAZY BY USING RUDE WORDS TO SPEAK WITH AND THIS MAKES US PUZZLED WITHOUT REASONS.... YOU WILL BE ISOLATED AND NO-ONE WILL MAKE FRIENDS WITH YOU AT THE POINT!

    Sunday, January 8, 2012 12:18 AM
  • User-326746839 posted

    To whom it may concern,

    Think that you have a string, let's say "Products"

    I want to create an instance of that entityso I do: Products products = new Products(); which works just fine

    But I want to pass the string as something that might could be instantiated for all entities in my datamodel.

    Let's say that instead of Products products = new Products(); I had

    var myentity = entity.EntitySet;
    myentity currententity = new myentity();

    Put it into a FormView. Is that possible at all? Of course, I'm talking about Dynamic Data not conventional ASP.Net

    I just wonder: what's the big deal with a simple question even tough it seems that the answer is not a silly stuff.

    I clearly understand the original question. Is pretty straightforward.

    Maybe for people with an IQ above 129 it will be difficult to understand but for normal people is simply clear.

    Is so simple that just people that have never programmed may not be able to understand because that simply thing happens to you all the time.

    If I have a data context pointing to Northwind entities then I'll have Products, Sections, Employees and so forth available for me to work. I'm obviously talking about an EF model.

    Having said that, if I'm writing code anywhere in my project and I write the word Products it will be magically illuminated by IntelliSense and will ask me to convert that string into an object of the type "Products" in my data base context model, isn't it true?

    SO THIS GUY, TOPOLOV, IS ASKING HOW TO DO THAT IN DYNAMIC DATA BECAUSE HE SUPPOSSES THAT THERE MIGHT BE A WAY FOR THE FRAMEWORK TO DO THE TRANSFORMATION DINAMICALLY WHEN RUNNING THE STANDARD DYNAMIC DATA WEB SITE WITHOUT ANY CUSTOMIZATION

    I've been reading this post and it just reminded me that the very same situation happened to me too here in this forum and I can tell him that despite of threats inflinged here against him he is free to ask whatever thing he considers to be pertinent to solve his issues in developing.

    You are not supposed to be making friends here Topolov but getting answers. Other thing is that Microsoft ASP.Net official web site is run by inexpert people. That's a crying fault and shame from them.

    I said that because if you come to an official web site you're expecting to find "official answers" and most of all: solutions. I already have friends to dialogue with and to play with and to joke with. So I don't see a reason to come here looking for friends but answers.

    That MVP doesn't make a penny out of it: ... simply their problem.

    That MVP goes crazy ... ... remeber CUSTOMERS IS ALWAYS RIGHT !!!!!!

    That Microsoft is cheap doing this the wrong way: mostly true !!!!

    But if the site is run by people divorced from Microsoft development team, what can you expect?

    Topolov says that this is the right place if you're looking for non-answer answers. That's a huge thing. You must be ashamed Microsoft

    People running the forum avoiding answering questions but providing a bunch of bla-bla-bla ... and most of all .... NO CODE AT ALLThis poor guy Topolov is been treated here like a social pariah just because nobody is willing to help him. And I say this because I haven't really seen an answer to his question.

     

    Best regards

    Carlos Porras (El Salvador)

    P.S. I know this post will probably be erased by running-MVP-people censorship

    Tuesday, January 10, 2012 2:09 PM
  • User1043796333 posted

    QUOTE

    I must say that I don't think my issue can be solved even in a paid basis
    I still don't understand what you want to achieve yet...

    Hi toplov, you are very unfriendly to us, since you think Microsoft's products are bad and you are of despite of these products... WHY DON'T YOU ABADON THESE THINGS? NO ONE IS FORCING YOU TO CONTINUE USING THEM.... YOU ARE OF NO REASONS AT ALL OF MAKING COMPLIAINS OF ALL THE MEMBERS HERE WHO ARE WILLING TO HELP YOU.....

    In fact, All the members who are here, as what I said above, they are willing help you.

    MVP (Steve) is a REALLY kind and nice person who helps you again and again without hesitations...

    Microsoft employees are still continuing helping you, but you ARE ALWAYS not satisfied with them, And none of us can understand you!

    So they told you about the paid address url, and you rejected it directly and spoke rudely....

    What are you going to do now??? Perhaps we cannot understand you at all.... BUT TO REMEMBER, IF YOU ARE ALWAYS MAKING US WORRIED AND CRAZY BY USING RUDE WORDS TO SPEAK WITH AND THIS MAKES US PUZZLED WITHOUT REASONS.... YOU WILL BE ISOLATED AND NO-ONE WILL MAKE FRIENDS WITH YOU AT THE POINT!

    QUOTE ends here

    -----------------------------------------------------------------------------------

    I want to achieve what I have asked for: create an instance of the object whose name is contained by a string (identified or defined or whatever it might be called, let's say Products) in an ASP.Net Dynamic Data C# EF project

    I don't abandon because I simply need to finish this project that I started working with more than 2 years ago

    I am not going to abandon becaus of lack of official support from the vendor. They delivered it with huge faults and huge promises that it'd be the state of the art technology

    So I feel cheated by the manufacturer

    Maybe contributors are "willing" to help me BUT they have demonstrated that they can't. Not their fault also but Miicrosoft's

    I was provided with an address for technical free ebooks on Dynamic Data and someone refered me to a link with pdfs in FRENCH and super basic stuff content

    What am I going to do now: I hope that I'll try to do what most programmers do after trying with Dynamic Data customization: custyomize every single page as if my project were something different from Dynamic Data

    Laughable, no?

    Isolated me from you? Have we ever be close? Have you ever helped me? Have I somehow depended on you somehow? Do I receive benefits or any other benefit from you besides non-sense wording?

    I think I will go crazy without you guys

    Tuesday, January 10, 2012 3:54 PM
  • User1043796333 posted

    Hi toplov, you are very unfriendly to us, since you think Microsoft's products are bad and you are of despite of these products... WHY DON'T YOU ABADON THESE THINGS? NO ONE IS FORCING YOU TO CONTINUE USING THEM.... YOU ARE OF NO REASONS AT ALL OF MAKING COMPLIAINS OF ALL THE MEMBERS HERE WHO ARE WILLING TO HELP YOU.....

    What are you going to do now??? Perhaps we cannot understand you at all.... BUT TO REMEMBER, IF YOU ARE ALWAYS MAKING US WORRIED AND CRAZY BY USING RUDE WORDS TO SPEAK WITH AND THIS MAKES US PUZZLED WITHOUT REASONS.... YOU WILL BE ISOLATED AND NO-ONE WILL MAKE FRIENDS WITH YOU AT THE POINT!

    -

    -

    To TIMO YANG

    After reading what is quoted above this I can certainly tell you that:

    It seems that the angry person here is you not me

    It also seema that the rude person here is you and not me

    It also seems that you are not entitled to provide technical support regarding Dynamic Data because, as you have said clearly before many times, this si something you don't know nothing about

    It also seems to me that you are doing wrong writing to me like this because this, despite of what you  VP guys thinks this is a place you own, you simply don't because you are placed inside an official Microsoft web site so your answerws represent or are supposedly supported by Microsoft itself. I don't think Bill Gates could be pleased being represented by you guys, a bunch of common, oxymoronix, rude, bad tempered, and mostly untalented and lack of knowledge

    BESIDES THATit seems to me that the Support Member Teams fits a little big to all of you guys

    Whay don't you rather start providing some useful code and let all this cheap chat aside, can you? are you able to?

    I'd guess tyou'd rather erase this post than beign really PRO's for your own

    Wednesday, January 18, 2012 12:00 PM
  • User1043796333 posted

    So my guess is that I move the satte of this question to "Answered", am I correct?

    To whom should I assign he answered question to this?

    Please tell me so I mark it accordingly, please

    Wednesday, January 25, 2012 11:56 AM
  • User-1488931086 posted

    So my guess is that I move the satte of this question to "Answered", am I correct?

    To whom should I assign he answered question to this?

    Please tell me so I mark it accordingly, please

    No. This problem cannot be marked as an answer until you are REALLY satisfied. Or just depends on you.

    Sunday, January 29, 2012 1:03 AM
  • User1043796333 posted

    OK. I APOLOGIZE

    I was thinking is beyond all this beautifuld go-went, back-and-forth of words (not a single line of worthwhile code) among us, I wonder:

    CAN SOMEONE RETAKE SERIOUSLY THE VERY FIRTS QUESTION OF THIS POST AND PROVIDE A REAL PROFFESSIONAL ANSWER?

    Is that much to ask?

    I know I'm not in good tems with you guys, but besides that I know you'll never be my friends andthat I haven't done too much as to achieve that goal, can you guys put aside all this non-sense wording and try to work in a solution to this

    I must add something: If by any means you're goin to say that my question is out of context, not well elaborated, that is confuse and thigs like that: PLEASE FORGET IT and don't answer technically but at least be sufficinet polite enough to say it in writing

    It's all about this:

    -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.--.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-

    DYNAMIC DATA WORKS BASED ON TEMPLATES ... MOSTLY. CUSTOMIZATION SHOULD BE THE LAST RESOURCE

    METADATA HELPS A LOT IN CUSTOMIZING FROM TRIVILA TO NON-SO-TRIVIAL STUFF AND BUSINESS LOGIC

    DYNAMIC DATA USES NO CUSTOM PAGES WHILE SCAFFOLDING THE STANDARD WAY, IT USES ITS 5 BASE TEMPLATE STANDARD PAGES
    (JUST 5 NOT MORE)

    DYNAMIC DATA DOES ALL SUBSTITUTION DEPENDING ON YOUR CHOICE IN THE MAIN MENU OF THE SCAFFOLDED ENTITIES

    HAVING SAID THAT, IF YOU HAVE CHOSEN AN ENTITY FROM YOUR MENU: IT MIGHT BE "PRODUCTS" OR "SECTIONS" OR "CUSTOMERS" OR "EMPLOYEES" OR ANY OTHER TABLE THEN MY QUESTION IS

    How can I create instances of the current entity (the selected one in the main menu) anywhere inside any of the 5 basic template pages?

    I ask this because you can detemine the selected entity by means of gathering the content of the "table" string in the OnLoad event of the basic pages

    So, I can gather that value and save it as a string representing the chosen entity from the main menu, in a variable session or any other string variable

    NOW: I WANT TO USE THAT STRING TO CREATE AN INSTANCE OF THE ENTITY REPRESENTED BY THAT STRING SO I CAN QUERY THAT VERY ENTITY, OR PASS DATA TO THAT ENTITY, OR COMPARE DATA WITH THAT ENTITY, OR UPDATE VALUES FROM THAT ENTITY, OR INSERT ROWS TO THAT ENTITY

    Is that so hard to achieve

    PLEASE: TRY TO USE DYNAMIC DATA EXAMPLES

    IT DOESN'T MAKE ANY SENSE USING ANYTHING ELSE

    REALLY!

    Wednesday, February 1, 2012 1:12 AM
  • User-1488931086 posted

    I know I'm not in good tems with you guys, but besides that I know you'll never be my friends

    No,I'm willing to be friends with you。

    I know you a newbie——Just like me……We are all learning new things and there's no need to say "Sorry"……Perhaps we've misunderstood each other。I know you are very upset but plz don't challenge those who are willing to help you。

    Nothing special ^_^,Wish you good luck to be helped……

    Reguards!

    Wednesday, February 1, 2012 1:18 AM
  • User1043796333 posted

    Understood

    Is this a new fresh start or is your pollte goodbye?

    I'll choose the firts one: Thank you

    I WANT TO ADD SOMETHING (capitals yous for emphazising not yelling, clear?)

    When you are working in Dynamic Data (you can see this while debugging), its behavior is very challenging

    It works like this: one step you have it all ... nex second you don't have nothing!!!!

    So there's no way for you to use PostBack or loops or counting rounds r waiting for Dynamic Data to behave the same way ol-fashioned top-down listed programs did

    Dynamic Data works on its own and she doesn't care about anything else which is not contained in its inntrisnic logic, in its architechture

    Having said that, WE PROGRAMMERS, need to do some things on our own:  SO WE CUSTOMIZE CODE INSIDE THE BASIC 5 PAGES

    WE DON'T WANT TO CREATE A NEW (NUMBER SIX, SEVEN, ETC) PAGE BUT WE DO NEED TO DO SOME CUSTOMIZATION IN SOME OF ITS METHODS OR EVENTS

    So we need a way of working with data from the database pointing to the table dynamic data is currently working with

    We need to be able to create instances (everywhere inside the 5 basic pages) of the current entity

    BUT WE NEED TO DO THIS AT ANY GIVEN MOMENT, EVEN IF DYNAMIC DATA IS NOT SHOWING, LISTING, DISPLAYING, PROVIDING DATA, HOLDING VALUES, MAKING AVAILABLE TO YOU OR ANYTHING ELSE THAT YOU CAN TRACE WHILE DEBUGGING

    This also belongs to an issue in which .Net framework CRUD technology is so encapsulated that you don't have access to useful pieces of code to interact directly with the database on your own

    You can override some methods, like OnSavingChanges() but then you have AN EMPTY METHOD in whcih you must write all the interactivity with the database on your own (that's pretty sad)

    Wednesday, February 1, 2012 1:39 AM