![]() We specified SQL expression Concat("t0.FirstName", "' '", "t0.Lastname") on top of Fullname property. remove QuickSearch and NameProperty from FirstName Public sealed class PersonRow : Row, IIdRow, INameRow Let's edit our PersonRow.cs: namespace MovieTutorial.MovieDB On the title of edit dialog, first name of the person is shown ( Carrie-Anne). Now after launching your project, you should be able to enter actors: Rebuilding and auto transformationĪs we declared a new enumeration and used it, we should rebuild solution to auto transform Declare a Gender enumeration in Gender.cs next to PersonRow.cs: using Serenity.ComponentModel Ĭhange Gender property declaration in PersonRow.cs as below: //.įor consistency, change type of Gender property in PersonForm.cs and PersonColumns.cs from int to Gender. Gender column in Person table should be an enumeration. ![]() Typeof(MovieDB.PersonPage), icon: "fa-users")] [assembly: NavigationLink(2300, "Movie Database/Person", Typeof(MovieDB.GenrePage), icon: "fa-thumb-tack")] [assembly: NavigationLink(2200, "Movie Database/Genres", ![]() Typeof(MovieDB.MoviePage), icon: "fa-video-camera")] [assembly: NavigationLink(2100, "Movie Database/Movies", Open Modules/Movie/MovieDBNavigation.cs, cut the navigation link shown below: [assembly: NavigationLink(int.MaxValue, "MovieDB/Person",Īnd move it to Modules/Common/Navigation/NavigationItems.cs: //. WithColumn("Character").AsString(50).Nullable() ForeignKey("FK_MovieCast_PersonId", "mov", "Person", "PersonId") WithColumn("PersonId").AsInt32().NotNullable() ForeignKey("FK_MovieCast_MovieId", "mov", "Movie", "MovieId") WithColumn("MovieId").AsInt32().NotNullable() WithColumn("MovieCastId").AsInt32().Identity() WithColumn("Height").AsInt32().Nullable() Ĭreate.Table("MovieCast").InSchema("mov") WithColumn("Gender").AsInt32().Nullable() WithColumn("BirthPlace").AsString(100).Nullable() WithColumn("BirthDate").AsDateTime().Nullable() WithColumn("Lastname").AsString(50).NotNullable() WithColumn("FirstName").AsString(50).NotNullable() WithColumn("PersonId").AsInt32().Identity() Public class DefaultDB_20221115_161200_PersonAndMovieCast : AutoReversingMigration Migrations/DefaultDB/DefaultDB_20221115_161200_PersonAndMovieCast.cs: using FluentMigrator Now its time to create a migration with two tables: It's better to call it Person as actors/actresses might become directors, scenario writers and such later. It's clear that we also need a Person table as we'll keep actors/actresses by their ID. We need a table MovieCast with columns like: MovieCastId If we wanted to keep a record of actors and the roles they played like this: Actor/Actress Extending Multi-Tenant Behavior To Movie Sample. ![]() Hiding the Tenant Administration Permission.Preventing Edits To Users From Other Tenants.Securing Tenant Selection On Server Side.Removing Tenant Dropdown From User Form.Adding Tenants Table and TenantId Field.Installing Serene from Visual Studio Marketplace. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |