GithubHelp home page GithubHelp logo

unosbaghaie / ybm.framework Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 23.47 MB

A framework based on .NET framework which facilitates Database related projects

C# 22.06% CSS 56.66% ASP 0.01% HTML 2.06% JavaScript 19.18% TypeScript 0.03% Smalltalk 0.01%

ybm.framework's Introduction

Welcome to the Ybm.Framework description

A framework based on .NET framework which facilitates Database related projects

features:

_ Instanciate Business layer classese in UI or Business itself

    IUserBusiness userBiz = ServiceFactory.CreateInstance<IUserBusiness>();

_ Tansactional methods in Business Layer

    [Transactional]
    public void CreateUser()
    {
        // fetch a record 
        // create an entity
        // update an entity 
        // and so on 
    }

_ Subsribe and publish

    [SubscribeTo(typeof(IUserBusiness),"AnEventToSubscribeToInIUserBusiness")]
    //this method would be invoked when the AnEventToSubscribeToInIUserBusiness event is invoked
    public void CheckIfUserIsActive()
    {

    }

you can override some methods in business layer to handle Create, Upate and delete entities

    public override void OnBeforeSavingRecord(object sender, EntitySavingEventArgs<User> e)
    {
        base.OnBeforeSavingRecord(sender, e);
    }
    public override void OnSavingRecord(object sender, EntitySavingEventArgs<User> e)
    {
        base.OnSavingRecord(sender, e);
    }
    public override void OnRecordSaved(object sender, EntitySavingEventArgs<User> e)
    {
        base.OnRecordSaved(sender, e);
    }
    public override void OnUpdatingRecord(object sender, EntitySavingEventArgs<User> e)
    {
        base.OnUpdatingRecord(sender, e);
    }
    public override void OnRecordUpdated(object sender, EntitySavingEventArgs<User> e)
    {
        base.OnRecordUpdated(sender, e);
    }

    public override void OnBeforeDeletingRecord(object sender, EntityDeletingEventArgs<User> e)
    {
        base.OnBeforeDeletingRecord(sender, e);
    }
    public override void OnDeletingRecord(object sender, EntityDeletingEventArgs<User> e)
    {
        base.OnDeletingRecord(sender, e);
    }
    public override void OnRecordDeleted(object sender, EntityDeletingEventArgs<User> e)
    {
        base.OnRecordDeleted(sender, e);
    }

ClaimBasedAuthorzation on controllers: which gather all Claims information and store in Tokens table to Authorize.

a page to manage userGroups' Tokens is provided

[TokenCategory(CategoryTitle = "Home Page", CategoryName = "HomePage")]
public class HomeController : Controller
{
    [ClaimBasedAuthorzation(TokenName = "View Home Page", ClaimType = "UserRight")]
    public ActionResult Index()
    {
        return View();
    }

    [ClaimBasedAuthorzation(TokenName = "Do Something", ClaimType = "UserRight")]
    public ActionResult DoSomething()
    {
        return View();
    }
}

_ All web pages and resources can be embeded to its dll and the framework provides them using VirtualPathProvider [in test period]

_ One DbContext will bee generated for all projects to interact with database [in test period]

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.