GithubHelp home page GithubHelp logo

signumsoftware / framework Goto Github PK

View Code? Open in Web Editor NEW
214.0 42.0 80.0 99.17 MB

Open Source framework for writing data-centric applications using the latest versions of .Net Core, C# (not-nullable), ASP.NET Web API, Typescript (strict), React, D3 and Sql Server or PostgreeSQL

Home Page: https://www.signumsoftware.com/en/Framework

License: MIT License

C# 65.28% CSS 0.62% TypeScript 33.52% PowerShell 0.03% Vim Snippet 0.46% PLpgSQL 0.08%
signum-framework react typescript entities linq

framework's Introduction

Join the chat at https://gitter.im/signumsoftware/framework

Signum Framework is an Open Source framework from Signum Software for writing data-centric applications over the latest technologies from Microsoft (.Net Core, C#, ASP.Net Web.API and Typescript in their latest versions) and web standard libraries (React, Bootstrap and D3). It uses either Microsoft SQL Server or PostgreSQL to store data.

The main focus of the framework is being able to write vertical modules (database tables, entities, logic and React UI components) that can be shared between projects.

It provides a consistent model for N-layer architectures by moving the entities to the very center of your solution using Signum.Entities.

Our cutting-edge ORM, Signum.Engine, has a full LINQ Providers that avoids N + 1 problem and lets you UPDATE / DELETE / INSERT entities without having to retrieve them first.

Signum.React let you write a Single Page Application using React, Bootstrap and TypeScript.

Check some of the features of Signum Framework in Southwind, a Northwind port running in Azure.

Signum Extensions

Set of modules that complements Signum Framework like Authorization, Charting, Dashboards, Mailing, Processes, Scheduled Tasks, Disconnected, User Queries...

Check the different modules in https://www.signumsoftware.com/es/Extensions

Main Features

  • Designed for vertical modules (aka: Bounded Context)
  • Entities-first approach
  • ORM with a full LINQ Provider
  • Unified validation
  • Schema generation and synchronization
  • WPF smart-client interface
  • React/Typescript SPA

Principles

  • Promote simple and clean code, avoiding astronautical architectures.
  • Favor compile-time checked code over dynamic code.
  • Create a solid foundation for the integration of application modules (on schema, BL and UI code).
  • Encourage a more functional way of programming.
  • Avoid code duplication.
  • Be a good citizen wherever we are (.Net, LINQ, React) following common practices and conventions.

Getting Started

  • Signum Framework: Know what makes Signum Framework suited for building complex business applications.
  • Signum Extensions: A set of ready-to-use modules that work with any Signum Framework application.
  • Documentation: Documentation (from Markdown files in GitHub)
  • Tutorials: Tutorials (in docx and pptx)
  • Create Application: The simplest way to get started. Create a new project by renaming and customizing Southwind example application.

ChangeLog

Signum Framework doesn't use any numeric versioning, since is distributed as source code we just use Git commit hashes.

Whenever there are big changes worth to mention, we typicaly write it in the related commit. Here is the list of the relevant changes:

framework's People

Contributors

adrianfarinapiera avatar alejandrocano avatar antonioh avatar avifatal avatar caltane avatar daniel31122000 avatar fbustamanteb avatar franknussbaum786 avatar ghockx1p avatar imaksoud avatar jafarmirzaie avatar jesusfrancesgarcia avatar kobebechtle avatar konstantinlukaschenko avatar mapachel avatar marcodinoto avatar mehdy-karimpour avatar mehdykarimpour avatar mindriven avatar olmobrutall avatar rezanos avatar rezanosratabad avatar robin-kirch avatar rondoo avatar solaimanjdn avatar sschoensee avatar stammr avatar thomasm1978 avatar tkura83 avatar ze-german avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

framework's Issues

error starting Load project

hi, i couldn't find a better place to ask about this.

i have been trying to get this framework to work for 2 weeks. i keep getting error after error.

now this:

InvalidOperationException: EntityKind - OperationLogic inconsistencies:
        RoleEntity is Shared but is NOT 'save protected'
        UserEntity is Main but is NOT 'save protected'
Note: An entity type becomes 'save protected' when a Save operation is defined for it
       at Signum.Engine.Operations.OperationLogic.OperationLogic_Initializing() in E:\lab\cheque\signumFW\ChiqCheque_minimal\Framework\Signum.Engine\Operations\OperationLogic.cs:line 176
       at Signum.Engine.Maps.Schema.OnSchemaCompleted() in E:\lab\cheque\signumFW\ChiqCheque_minimal\Framework\Signum.Engine\Schema\Schema.cs:line 395
       at ChiqCheque_minimal.Logic.Starter.Start(String connectionString) in E:\lab\cheque\signumFW\ChiqCheque_minimal\ChiqCheque_minimal.Logic\Starter.cs:line 87
       at ChiqCheque_minimal.Load.Program.Main(String[] args) in E:\lab\cheque\signumFW\ChiqCheque_minimal\ChiqCheque_minimal.Load\Program.cs:line 43

webpack-assets.json file not found

the solution builds successfully but an error happens when loading the home page

Could not find file 'C:\Users\###\Documents\Visual Studio 2015\Projects\exams\exams.React\dist\webpack-assets.json'.

Line 4: @{ Line 5: Line 6: string json = File.ReadAllText(Path.Combine(Server.MapPath("~/dist/"), "webpack-assets.json")); Line 7: var webpackAssets = JObject.Parse(json).Properties() Line 8: .ToDictionary(a => a.Name, a => Url.Content("~/dist/" + (string)a.Value["js"]));

Source File: C:\Users#####\Documents\Visual Studio 2015\Projects\exams\exams.React\Views\Home\Index.cshtml Line: 6

Problems with modal dialog

Hi,
After upgrading the system, I saw this odd thing.
When you click the first time on "View" in the grid (certain grid), nothing happened. On the second time, it works and throw some JS errors like "Uncaught Error: 2 elements with id = 'nav_CreatedBy_hidden' found"
if I understand the error, it found duplicated html elements, it is like the first window was opened, but not seen on the screen, than the second click on view, opens the modal again, and the other one is not closed.

So I did a little dom research, the forst click the modal dom shows up, but it is not on the screen.
the second click it is not destroyed and a new modal coming in. this is the duplicate error.

The odd thing, it is happening only on one entity....

Fetching related information from other tables in the view

Hi,
In the view, When I am in a certain entity, I want to fetch data from other tables/entities and arrange the view differently.
I don't need any pre-defined control such as search control for that, I want to handle it manually.

But, I dont want to fetch the data in the razor, it is ugly and I am afraid it will get bigger, Can I take the code to a more suitable place such as controller action? or an interception?

Thanks
Avi

Error popup

For some reason, i Cant see anymore the popup when an exception happen.
Do you have an idea why?

Thanks

Send Mail

Is there a way to send a mail thought the framework. I will put the subject and email and message straight by code.

Thanks

Considering SaveProtected --> RequiresSave

Speaking about SaveProtected in #61 I think I can simplify the concept:

This is how it currently works:

  1. Registering Save-like on an entity sets SaveProtected
  2. The developer can override SaveProtected if he needs to.
  3. At start time the framework checks that RequiresSaveProtected(EntityKind) == SaveProtected

Note: RequiresSaveProtected returns true for [String, Shared, Main] and false for [System, SystemString, Relational, Part, SharedPart].

But I've been illuminated with a simpler algorithm that maybe is easier to remember.

  1. Registering an entity sets RequiresSave to CalculateRequiresSave(EntityKind) using the same logic.
  2. The developer can override RequiresSave.
  3. At start time the framework checks all the entities that have RequireSave==true having at least one Save-like operation registered.

For the vast majority of cases the change in behavior will be transparent, except than when you forget to register a save you'll get a simpler to understand error like

'YourEntityName' is 'Main' and requires a save operation but, none has been found. Consider one of the following options:
* Register a save operation for `YourEntityName` using `save` snippet.
* Change the EntityKind of `YourEntityName` to one that does not require save.
* Exceptionally, call 'OperationLogic.RequiresSave(typeof(YourEntityName), false)' to override the value.

Does this looks like a good idea?

Feature request : Make the UI more single page app alike.

Hi.
I have a system with around 40-50 users.
Some of the users are browsing thousands of rows on a daily bases.
When you are in the grid, and you want to view more details, you click on the "View" and then you get redirected to an other page.
if you are in a ling grid, you loose the context of where you were and which one you clicked on.
My request is instead of redirecting the entire page, just open the form in a modal dialog.

More than that, it will make the app more browsable and fast to work in.
I see 3 use cases.

  1. clicking on the view link in the grid.
  2. clicking on the related entity in the grid (Users => Roles for example)
  3. Creating new entity.

As far as I can see it, since there is no support today, you can leave this config as a single boolean.

If you want to go advanced, you can do the following.
in the AppClient cs file, under the EntitySettings you can add a setting for each entity.
bool ShowCreationFormInModal
bool ShowGridDetailsInModal

for related Entities you can do this:
bool ShowGridRelatedInModal
or create a function in EntitySettings as the following:

public void OpenRelatedEntitiesInModal(params Entity[]);

This will allow certain related entities to be opened in a modal.

I hope it was understandable....
Avi

Send email

Hi Olmo and the community,
I have created an email template, and now I would like to send an email message.
I am interested in two ways of sending an email:

  1.   Send by button click 
    
  2.   Send mail automatically 
    

Thank you

Setting up cache for master entities

Hi,
In starter.cs I am adding the following function:

    private static void SetupCache(SchemaBuilder sb)
    {
        CacheLogic.CacheTable<CountryEntity>(sb);
        CacheLogic.CacheTable<LanguageEntity>(sb);
        CacheLogic.CacheTable<EmailEntity>(sb);
        CacheLogic.CacheTable<PixelEntity>(sb);
        CacheLogic.CacheTable<ChannelEntity>(sb);
        CacheLogic.CacheTable<BrandEntity>(sb);
    }

For some odd reason I am getting the following error:

An exception of type 'System.ArgumentException' occurred in Signum.Utilities.dll but was not handled in user code Additional information: CrmApp.Entities.ChannelEntity already registered

Can you please explain why is that?
Why didnt this happened to the first line?
Is this how you setup simple cache for EntityData.Master ?

Thanks

React Searchcontrol Pagination

If you navigate to page 3 of searchresults and then add a filter returning a single result you get "no results found" and trying to display results 41-40 of 1.

Navigating to page 1 solves the issue.

Why doesn't ChildCollectionChanged event fire?

I have a failing unit test because the ChildCollectionChanged event in my entity doesn't fire. I have created a similar situation in Southwind.Load where it also doesn't fire. Can anyone explain why it doesn't fire?
`
// This is the declaration of the Mlist in OrderEntity
[NotNullable, ValidateChildProperty, NotifyChildProperty, NotifyCollectionChanged]
[NoRepeatValidator]
public MList Details { get; set; } = new MList();

    // Just copy-paste following line into Southwind.Load
    private static void TestChildCollectionChanged()
    {
        Schema.Current.Initialize();

        UserEntity employee;

        using (AuthLogic.Disable())
        {
            employee = Database.RetrieveAll<UserEntity>().FirstOrDefault(u => u.UserName == "Steven");
        }

        using (UserHolder.UserSession(employee))
        {
            var jonas = Database.Query<PersonEntity>().SingleEx(p => p.FirstName == "Jonas");

            var order = jonas.ConstructFrom(OrderOperation.CreateOrderFromCustomer);

            var konbu = Database.Query<ProductEntity>().SingleEx(p => p.ProductName.Contains("Konbu"));

            var line = new OrderDetailsEntity
            {
                Product = konbu.ToLite(),
                UnitPrice = konbu.UnitPrice,
                Quantity = 1,
                Discount = 0,
            };

            // The next line should fire the event
            order.Details.Add(line);

            order.Execute(OrderOperation.SaveNew);
        }
    }

`

Cluster for the framework

Hi Olmo and the community,

As we start to have a lot of traffic on our website, we like to set a cluster with 2 servers (farm infrastructure). The problem that I see is some scheduled task that we have on our website.

Do you have a solution for that?

Thank you,
Roi

ObjectDumper throws exception on non Entity class

I'm using the ObjectDumper to log the state of classes when they are put in an MSMQ messagebody. These are simple classes not inhereting from Entity and they only contain attributes.
In October the ObjectDumper has been modified in such a way that it now produces the following exception on Dumping my class:

System.InvalidOperationException occurred
HResult=-2146233079
Message=Entity {0} has auto-property {1}, but you can not use auto-propertes if the assembly iy not processed by 'SignumTask'
Source=Signum.Entities
StackTrace:
at Signum.Entities.Reflection.Reflector.CheckSignumProcessed(FieldInfo fieldInfo) in C:\Projects\git\SailingForecast\Framework\Signum.Entities\Reflection\Reflector.cs:line 304

Adding SignumTask to the project breaks the build with an "Object reference not set to an instance of an object." exception.
To me it looks that even though the Dump ExtensionMethod is declared on object, it actually requires an object of type Entity.

So I have two questions:

  • Why is the check of SignumTask built in?
  • What do I need to do make it work on all objects again?

Inheritance in Entities and code reuse

Hi Olmo,
I have a usecase very similar to BillingInformationEntity and ShippingInformationEntity, How can 2 very similar entities can have inheritance between them and code reuse (query, ui and such).

Thanks
Avi

Entity Discrimination in razor

Hi,
I have 3 Entities.
Customer
CustomerContactPerson (has one Customer)
CustomerCall (has one Customer, has one CustomerContactPerson)

Each customer may have few contact persons. (standard B2B)

In razor, when I want to fill new CustomerCall, I want to mention which CustomerContactPerson was in the call.
Placing a combo will bring all CustomerContactPersons (from all customers), but I want to show only the related contacts from the related customer.
Is it possible? if not, whats the best workaround?

Thanks

Passing parameters from view to logic

Hi Olmo and the community,
i have a send email button that triggers an entity operation on an entity details popup page.
image

new Graph.Execute(AccountOperation.SendEmail)
                {
                    AllowsNew = true,
                    Lite = false,
                    CanExecute = e =>
                    {
                        //make sure username and email are not nulls
                        return !string.IsNullOrEmpty(e.EMail) && !string.IsNullOrEmpty(e.UserName) ? null : "Email and user name are required to send an email";
                    },
                    Execute = (e, args) =>
                    {
                                //here i need to select an email template from a value passed from the client
                                SendEmail(args.TemplateType);
                     }
                }

When the send button is being clicked I need to pass the value selected in the adjacent dropdown (not part of the entity), to the logic class in order to apply a relevant email template.
How can this be achieved?
Thank you,
Roi

Nullable DateTime field in mixin wont accept null unless you use question mark

When applying a datetime field to mixin with nullable attribute you get an exception when you save the entity with null value in the date time.
I dont think it will happened to a regular entity.
This will solve the case (the ? ):
[Nullable]
public DateTime? DateTime {get;set;}
The error and the stack are not on me, if you cant reproduce it, please ask me.

Search controller default queries

Hellow Signum community,
I need to create queries that will appear on the search controller of an entity on page load, how can I create such default queries? Is it possible to have more then one default query?

Type Signum.Entities.Authorization.ResetPasswordRequestEntity not found

Hi,
I have generated a new app without "Auth (Reset password)" and I got this error trying to run the app:

An exception of type 'System.Collections.Generic.KeyNotFoundException' occurred in Signum.Utilities.dll but was not handled in user code

Additional information: Type Signum.Entities.Authorization.ResetPasswordRequestEntity not found in the schema

Any idea why?

Email templates in multiple languages

Hi,
this is my CultureInfo table:

1   635955378572137575  en  English English
2   635955378643707575  es  español    Spanish
3   635955378646417575  de  Deutsch German
4   635955378648517575  da  dansk   Danish
5   635955378650277575  fr  français   French
6   635955378651867575  sv  svenska Swedish
7   635955378653517575  it  italiano    Italian
8   635955378655217575  pt  Português  Portuguese
9   635955378656707575  tr  Türkçe    Turkish
10  635955378658297575  nl  Nederlands  Dutch
11  635955378659837575  pl  polski  Polish
12  635955378661407575  no  norsk   Norwegian
13  635955378663227575  ro  română    Romanian
14  635955378664837575  zh  中文  Chinese
15  635955378666407575  fi  suomi   Finnish
16  635955378668057575  id  Bahasa Indonesia    Indonesian
17  635955378670167575  ko  한국어   Korean
18  635955378671887575  ar  العربية  Arabic
19  635955378673557575  lv  latviešu   Latvian
20  635955378682787575  ru  русский  Russian
21  635955378688657575  el  Ελληνικά    Greek

I need to generate email messages in all these languages. The following code creates English messages only, for all the cultures

                SystemEmailLogic.RegisterSystemEmail(() => new EmailTemplateEntity
                {
                    Messages = CultureInfoLogic.ForEachCulture(culture => new         EmailTemplateMessageEntity(culture)
                    {
                        Text = PoiBEmailMessage.MessageBody.NiceToString(),
                        Subject = PoiBEmailMessage.MessageSubject.NiceToString()
                    }).ToMList()
                });

what do I need to do for all other languages?

Charts - default chart preset

Hellow Signum community,
Can I create default charts for an entity? Is it possible to have more then one default chart preset?

None default query and menu name

Hi Olmo and the community,
I have two search queries on my Account entity. One with where clause and one without.

1.  dqm.RegisterQuery(AccountsQuery.AccountsNoTests, () =>
                                         from e in Database.Query()
                                         where e.IsTest == false || e.IsTest == null
2. dqm.RegisterQuery(typeof(AccountEntity), () => from e in Database.Query()

My menu contains the following node, to call a query limited by the where clause.

@Html.WebMenu(new WebMenuItem { Link = new FindOptions(AccountsQuery.AccountsNoTests)
   {
              SearchOnLoad = true
   }})

I need the menu to show the name Accounts instead of Accounts no tests.
At the same time I am required to keep the query without the where clause accessible from the omnibox.

Create a NuGet package

Please provide it as a NuGet package. By doing that it is easy to stay up to date e.g for bufixes and recognize breaking changes/major updates. The visibility of this great framework will also increase.

tabs

Hi Olmo and the community,
I need help in creating tabs on an entity page, how do I go about it, please?

Preserving user selections from previous page

Preserving user selections from previous page, for example if I am at the page as illustrated by the image above, I would build some queries and then navigate to one of the rows details via the “View” link, then by clicking a browser back arrow, I want my queries to stay intact. I would also like to add a "Back" - return to previous page button to the inner pages.

Left join with the framework

How can i do a query with a left join?

Example:
Select *
From account A
Left join Bonus B on A.ID = B.accountID
WHERE B.ID IS NULL

CodeGeneration

in Signum.Engine.CodeGeneration.EntityCodeGenertor in method WriteField(string fileName, DiffTable table, DiffColumn col)

at the end of the method it appends the result of string.Format . this will throw an exception as you need to escape the "{" "}"

current:
sb.AppendLine("public {0} {1} { get; {2}set; }".FormatWith(type, fieldName.FirstUpper(), IsReadonly(table, col) ? "private" : null));

Should be:
sb.AppendLine("public {0} {1} {{ get; {2}set; }}".FormatWith(type, fieldName.FirstUpper(), IsReadonly(table, col) ? "private" : null));

how to create a view displaying an entity by Custom index

I would like to create a view in the CRM , which displays an entity (‘Account’) not by its id but by a custom key (‘ExternalId’).
(The default views select the entity by the PrimaryKey field of Lite, which does not show any other fields)
How do I use the framework to do it?

email configuration

Hi Olmo,
I need to create a “new email button” on an “account entity” details view, where an e mail
template will be selected from a dropdown.
image
Clicking on envelope button will open the “new email message” dialog, where the template should be loaded along with the account details rendered in the relevant fields, e.g. addressed to = accounts email etc..
image
P.S. What I have managed to accomplish so far, is doing all of this programmatically, without opening the "new email message" dialog for the user.

Upgrade

Hi Olmo, how are you? We are about to upgrade the framework, here are a few questions:
The updated version is written in c#6, we are using vs 2013, can we upgrade the vs 2013 to use the upgraded framework?

Strategy needed for custom layout of Signum React controls

A lot of Signum React entity components are made using the Bootstrap grid. It has 2 columns for the label and 10 columns for the input. My company's styleguide dictates a different setup with the input stretching to full width and a label on top of it. This is a sample html for a rendered date field:

<div class="control-group">
    <label class="control-label" for="Sailing Date">
        Discharge Date
    </label>
    <div class="controls">
        <input class="form-control input-xlarge hasDatepicker"  id="SailingDate" name="SailingDate" type="text" value="">
    </div>
</div>

So basically I want to adapt a different alignment for all Signum React ontrols. What would a good strategy for doing this?

Omnibox does not take EntityData attribute into account

When defining an entity as:

[Serializable, EntityKind(EntityKind.System, EntityData.Transactional)]
[Description("Logging")]
public class MasterDataMessageLogging : Entity

and searching this entity by using the omnibox the results are default shown in ascending order of id instead of descending.

CultureInfo exception

Hi!

We have a problem in our web application with CultureInfo entity when users try to register. This is the exception:

The instance Portuguese is sealed and can not be modified

And this is the trace:

at Signum.Entities.Modifiable.set_Modified(ModifiedState value)
   at Signum.Entities.ModifiableEntity.Set[T](T& field, T value, String automaticPropertyName)
   at Signum.Entities.Basics.CultureInfoEntity.PreSaving(Boolean& graphModified)
   at Signum.Engine.Saver.<>c__DisplayClass2_1.<Save>b__2(Modifiable m, Boolean& graphModified)
   at Signum.Entities.Reflection.GraphExplorer.PreSaving(Func'1 recreate, ModifyEntityEventHandler modifier)
   at Signum.Engine.Saver.Save(Entity[] entities)
   at Signum.Engine.Database.Save[T](T entity)
   at ....UserController.DoCreateUserAndLogin(...)
   at lambda_method(Closure , ControllerBase , Object[] )
   at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary'2 parameters)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary2 parameters)
   at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass15.<InvokeActionMethodWithFilters>b__12()
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func'1 continuation)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func'1 continuation)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func'1 continuation)
   at System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName)

We have registers like these in our database (from CultureInfo):

Portuguese (Portugal) | pt-PT | português (Potugal)
Portuguese | pt | português

Nevertheless, when we try to synchronize the database we always obtain this script:

UPDATE basics.CultureInfo SET 
  Ticks = 635858020893728000,
  Name = 'es-ES',
  NativeName = 'español (España, alfabetización internacional)',
  EnglishName = 'Spanish (Spain, International Sort)'
 WHERE ID = 3 AND Ticks = 635858020893728000

Do you have any idea about where is the problem?

Thank you!

Creating Lite from int

Hi,
I have an int in my hand which represents CustomerID.
I want to attache it to customer foreign key.

var cId = 2;
var t = new TransactionEntity();
t.Amount = 20;
t.Customer = //how can I create Lite from cId variable here (2).

public class TransactionEntity : Entity{
   public int Amount{ get; set; }
   public Lite<CustmerEntity> Customer{get;set;}
}

Thanks

Or statement in search criteria on the UI

Hi,
As for today the app supports "and" scenarios, so the or statement is only going via server side coding.

The or statement ui is much more complicated, but can be overcome in a modal window.
Here is a good example of full query example: http://demos.telerik.com/aspnet-ajax/filter/examples/overview/defaultcs.aspx

People tends to think that or statement is needed because of bad data modeling, in the real world, you find yourself very early with this need (as an end user).
Thanks

C# migration suggestion

Hi,
When I run C# migration, I want to break it in to few migrations for "post migration tests".
The problem is that you cannot choose to run only the first migration, its all or nothing.

What do you think?
Avi

Chart button

Chart button

After clicking Chart button, I am getting an error with a message “No chart script loaded in the database”. How do I make it work?

Role

Hi,
I m trying to show or not to show thing depending if the user inside a role has read permission on some entity.
How can i do that?
For example my view of my account has a list of BonusEntity and i dont want everybody to see this:

@Html.SearchControl(new FindOptions(typeof (BonusEntity), "Entity.Account", ac.Value), new Context(ac, "BonusEntity"))

Thanks

Pagination All

I want to disallow the search all in the framework?
Is there a good way to do that?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.