Base solution for your next web application

Activities of "microgate"

Answer

Hi

No, i don't know what i have to do. I have always a textbox instead combobox or other list object. I have try with other tables, but is always same..

Answer

Hi,

"I suggest you to move your tables to AspNet Zero database. It will make your development easier for the future. --> ok, but when I import my sql table in new db, the tool change the PK and set it in a new column "id" as show in first question. Is possible to set as PK my original colum (if is not a problem for AspNet Zero)? I can leave your columns "Id" and "TenantId", but if can set my colums as PK, i can recreate the original relation.

"Don't add migration at first. Define the relations between your entities and add a single migration for all of your entities at once." --> How I have to define this relations? in attached file "EnitiesRelations.JPG" you can see my property from Customer to Address (one to many). I had use System.Collections.Generic.List, but i think i must to use one your list object (I used the same method for DTO classes: CustomerDto and AddresseDto). However in a "InsertDiv.JPG" you can see Address FK ad textbox and not as ComboBox. If i use PowerTool for regenerate this table, i loose my new property (as I expect). Instead a TextBox or ComboBox, is possible to define a control that open a new div for insert a new Addess or something like this?

"Normally, there should be a combobox item. Could you try to define relations between your entities as I explained in my second answer above and see if textboxes become combobox" --> In CreateOrEditModal.cshtml file, the address object is: input class="form-control" id="Addresse_idAddress" value="@Model.Addresse.idAddress" type="text" name="idAddress" required. By Modifying the relationships between the entities, how could it automatically change to a ComboBox?

I think there is a bug or something wrong. If I save a new Adress i have one error as you can see in "SaveAddress.JPG". There are two problems: 1) why this error (maybe about FK)? 2) The record was written on the DB... even if the Web page, it returns an error.

"Sorry, it is not supported yet. to create a Master Detail web form" --> Can I create this page by myself from scratch?

"if you can send a sample MySql database schema to [email protected], it would help us to test your case" --> Yes i will send a .bak file because the DB is new and is empty. Do you need my original DB?

Answer

Hi ismcagdas

Another question: as you can see in attached file, i have import a TestResults classes (without table). The Html page was created, but correctly if i save, an error is raised ("Error Save because no table.JPG"). My problem is that a insert hatml page ("CreateMask Html.JPG") show the foregn key as a textbox and not like a combobox. In this file "Table.JPG" you can see my table. I expect to have a ComboBox when there are FK and about this I think that the software should know the relationships between tables and the PK will be hidden.

Do I need to intervene manually to change the TextBox in ComboBox or can I do it via tool? Obviously it also serves the code to load data from the DB (here I wait for the reply to the previous post if you can use 2 DB).

Other question: is possible to create a Master Detail web form?

Regards Gianni

Answer

Hi ismcagdas, thanks for your answer

I think that import my sql table in your DB (the new db that contains all your Sqltable) is impossibile in that i loose the table relations. So i think is better use 2 different DB. I think is possible, but in this situation, how i have to configure the connection strings in all projects? And how does it work with 2 connnection strings?

For create the entities code (and all files for manage my tables like Dto, services, ecc) is better using Asp Net Zero Enity Generator, or another tool? If i must use Enity Generator, i think i don't have to check "Update Database"...and what about "Add Migration"? What is the difference?

When i import a table with your tool, are creted many files and in "*.Application" project in "CustomersAppService" i can test with Postman the Api Rest services. This is grat, but how i can know the Verbs of these service? There anen't the attribute (es. [HttpPost])...how can work?

"We will test this and get back to you. Normally there shouldn't be such an error." --> ok let me know

"No. I suggest you to use source control for this. You can revert changes easily." --> Now I'm using "Generate Demo Project", i thik i can create different ok this project for testing and delete quickly some errors. In Production enviroment, all my code will be under source control.

Regards Gianni

Question

Hi I have istalled everithing using Asp.Ner Core Mvc JQuery template and now i have used "ASP.NET Zero Power Tools" for import my Sql table in new database create with Asp Net Zero tables. i have some questions:

  • Can I import all my Sql tables in one step or i have to import every single table?
  • If my table to import, have a one to many relations, i have to first import the "child" table?
  • As you can see in attached file (Difference.JPG), the data types of tables are different (nvarchar(MAX)) and in a new table the PK is change. Is possible to change this behavior?
  • If i have to import table by table, what happens to relationships between tables (now the PK is change). Are they imported or not? And about Navigation Property of Entities, can i navigate from one object and its collection (one to many db relation) like Customer.Adresses?
  • Is possible to delete one table and all created classes with some tool?
  • The table Customer is empty (no records). Why the html page retrive a validtion error (attached file "GetCustomerPage.JPG")?
  • In which project are the methods of CRUD vai Rest API exposed?

Regards Gianni

Showing 1 to 5 of 5 entries