OutKiller 1.0.0

This package  aim is that create standardization rules to functions return object. This structure has a few benefit like that I showed in below

Help you to code standartizion and coverage of code's purpose.

Type Safety and Error Preventing (like not found rec on Db exception) Encoruge To use SOLID prencibles and develope execeture and private method in class

Install-Package OutKiller -Version 1.0.0
dotnet add package OutKiller --version 1.0.0
<PackageReference Include="OutKiller" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add OutKiller --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

OutKillerProject

This class aim is that create standardization rules to functions return object. This structure has a few benefit like that I showed in below

Help you to code standartizion and coverage of code's purpose.
Look at the "SampleApplication.Task/PersonTask.cs" class to see implementation.

Type Safety and Error Preventing (like not found rec on Db exception)
Encoruge To use SOLID prencibles and develope execeture and private method in class

Here is the sample piece of code to show usage.

using SampleApplication.Models;
using ServiceResponse;
using System.Collections.Generic;
using System.Linq;
namespace SampleApplication.Task
{
    public class PersonTask
    {
        private List<Person> personList;
        public PersonTask()
        {
            personList = new List<Person>();
            Person personObj = new Person
            {
                Id = 1,
                Address = "Test",
                Age = 20,
                NameSurname = "CanBey"
            };
            Person personObj1 = new Person
            {
                Id = 2,
                Address = "Test1",
                Age = 21,
                NameSurname = "CanBey1"
            };
            personList.Add(personObj);
            personList.Add(personObj1);
        }
        public ServiceResult<Person> findPersonWithId(int id)
        {
            var foundedPerson = personList.FirstOrDefault(x => x.Id == id);
            return foundedPerson != null ? ServiceResult<Person>.SuccessResponse(foundedPerson) : ServiceResult<Person>.FailResponse("Record not found.");
        }
        public ServiceResult<List<Person>> getAllPersonWithHelper()
        {
            return ServiceResult<List<Person>>.SuccessResponse(personList);
        }
    }
}

OutKillerProject

This class aim is that create standardization rules to functions return object. This structure has a few benefit like that I showed in below

Help you to code standartizion and coverage of code's purpose.
Look at the "SampleApplication.Task/PersonTask.cs" class to see implementation.

Type Safety and Error Preventing (like not found rec on Db exception)
Encoruge To use SOLID prencibles and develope execeture and private method in class

Here is the sample piece of code to show usage.

using SampleApplication.Models;
using ServiceResponse;
using System.Collections.Generic;
using System.Linq;
namespace SampleApplication.Task
{
    public class PersonTask
    {
        private List<Person> personList;
        public PersonTask()
        {
            personList = new List<Person>();
            Person personObj = new Person
            {
                Id = 1,
                Address = "Test",
                Age = 20,
                NameSurname = "CanBey"
            };
            Person personObj1 = new Person
            {
                Id = 2,
                Address = "Test1",
                Age = 21,
                NameSurname = "CanBey1"
            };
            personList.Add(personObj);
            personList.Add(personObj1);
        }
        public ServiceResult<Person> findPersonWithId(int id)
        {
            var foundedPerson = personList.FirstOrDefault(x => x.Id == id);
            return foundedPerson != null ? ServiceResult<Person>.SuccessResponse(foundedPerson) : ServiceResult<Person>.FailResponse("Record not found.");
        }
        public ServiceResult<List<Person>> getAllPersonWithHelper()
        {
            return ServiceResult<List<Person>>.SuccessResponse(personList);
        }
    }
}

Dependencies

This package has no dependencies.

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.0 255 6/4/2018